Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes.DeleteDangerous() does not delete PVC Volumes #683

Open
regnaio opened this issue Apr 23, 2024 · 3 comments
Open

Kubernetes.DeleteDangerous() does not delete PVC Volumes #683

regnaio opened this issue Apr 23, 2024 · 3 comments

Comments

@regnaio
Copy link

regnaio commented Apr 23, 2024

According to the doctl kubernetes cluster delete docs, the --dangerous flag should delete PVC volumes

However, godo.Client.Kubernetes.DeleteDangerous() does not delete PVC Volumes

Using the latest version: v1.113.0

@bentranter
Copy link
Member

Hey @regnaio, thanks for the report. I've reached out to our Kubernetes team for more details, and will report back when I hear back from them.

@timoreimann
Copy link
Contributor

hi @regnaio 👋 I work on the DOKS (managed Kubernetes) team at DO.

I just verified that the flag / godo function you mentioned is working as expected: a cluster which had a PVC got cleaned up properly, and the backing DO block storage volume was gone at the end when --dangerous was specified.

In case you were expecting to find code in godo that explicitly looks for PVCs/PVs in your cluster to delete them: that is actually not how the functionality is implemented. Instead, our backend keeps track of all managed resources and makes sure they get deleted when a cluster is (dangerously) deleted. I'm not sure if interactions against the API server is what you were referring when you quoted the godo function, but I figured I should add clarity here.

In case you do find that your cluster(s) aren't getting their volumes cleaned up when using the flag in question, could I ask you to file a DO support ticket? As mentioned the functionality seems to be working correctly per se, so any remaining issues may require taking a deeper look. Our support team is happy to help you on that should it be needed.

Thanks in advance!

@regnaio
Copy link
Author

regnaio commented Apr 25, 2024

I can try this again the next time I spin up a DigitalOcean k8s cluster

However, I know for sure that I had XFS PVC's bound to Pods in the cluster (immediately before cluster deletion), so they should have been considered part of the cluster. godo.Client.Kubernetes.DeleteDangerous() did not delete the XFS PVC's

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants