How to Delete Volumes from Kubernetes Clusters
Validated on 12 Mar 2021 • Last edited on 18 Dec 2024
DigitalOcean Kubernetes (DOKS) is a Kubernetes service with a fully managed control plane, high availability, and autoscaling. DOKS integrates with standard Kubernetes toolchains and DigitalOcean’s load balancers, volumes, CPU and GPU Droplets, API, and CLI.
You’ll typically use a volume when you want data to persist after a container process exits. If you delete volumes with kubectl
using the pvc
option, the volume will be permanently deleted.
When you delete a cluster from the control panel, you can select the associated volumes to delete them automatically. You can select a subset or all the volumes associated with the cluster.

You can also manually delete the associated volumes from the control panel. In this case, visit the control panel and manually delete the volume.
While you can currently delete volumes and load balancers from the control panel, we recommend using kubectl
to manage all cluster-related resources.
You can also use doctl
or the API to delete the associated resources automatically when you destroy a cluster.
For more about managing persistent volumes, see:
-
Other Kubernetes Components in the DigitalOcean Community’s Introduction to Kubernetes.
-
Kubernetes Objects in the official Kubernetes Concepts guide
-
Persistent Volumes in the official Kubernetes Storage guide