Skip to main content

Delete a cluster

Deleting a cluster removes the control plane, all worker nodes, the cluster network and all data in the cluster – including the persistent volumes.

Achtung

Deletion is permanent and cannot be undone. Back up or migrate your data completely before you continue.

Prerequisites​

  • Access to ccloud
  • A working connection via kubectl, as long as you still want to back up data

Before deleting​

Work through these points while the cluster is still running:

  1. Back up application data – data in persistent volumes is deleted with the cluster. Back it up, for example in S3 Object Storage.

  2. Back up the configuration – export your manifests unless they are already in version control:

    kubectl get all -A -o yaml > cluster-backup.yaml
  3. Back up secrets – credentials and certificates that exist only in the cluster are lost.

  4. Delete services of type LoadBalancer – so that the public IP addresses are released cleanly:

    kubectl get svc -A --field-selector spec.type=LoadBalancer
    kubectl delete svc <name> -n <namespace>
  5. Check external references – DNS records that point to IP addresses of this cluster stop working after deletion.

Delete the cluster​

  1. Open the cluster in ccloud.
  2. Select Delete and confirm.

The cluster changes to the status Deleting and disappears from the overview once it has been removed.

What is deleted​

ResourceBehaviour
Control plane and worker nodes of all node poolsRemoved
Workloads in the clusterTerminated
Persistent volumesDeleted
Cluster networkRemoved
Kubeconfig filesNo longer valid

Resources outside the cluster – such as data in S3 Object Storage – are not affected by the deletion.

Remove individual resources instead of the whole cluster​

A smaller change is often enough:

GoalApproach
Remove a node pool you no longer needSee Add node pools
Remove an applicationkubectl delete or helm uninstall