When DO restarts a kubernetes cluster for the automated updates, how exactly does the restart take place?

I ask because when I have recycled nodes in the past, I have seen the pvc enter a state where kubernetes insists that the pv is mounted but it certainly isn’t.

  1. How to remove a node safely?
  2. If a pvc goes into this state, how to tell kubernetes it is safe to reset the mount status?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there!

There are some race conditions that can impact deployments with volumes that are destroyed or recycled outside of the Cloud Controller Manager. We are working to improve this, but for now you can try this work around.

You can use kubectl get volumeattachment, to get information on what mounts kubernetes believes are active. You can use kubectl describe tog et more information on each. Due to the race conditions mentioned above, sometimes the volumeattachment object that represents a mounted volume is not deleted or stuck in the deletion process. This failure to delete the object makes kubernetes thinks that the volume must still be mounted.

To resolve this issue you need to modify the volumeattachment using:

kubectl edit volumeattachment <volume name>

Then remove the following section from the volume attachment metadata section:

finalizers: external-attacher/dobs-csi-digitalocean-com

This lets Kubernetes run through the rest of the cleanup process, find the volume state correctly and attach it to the new node.


John Kwiatkoski Senior Developer Support Engineer