Delete cluster
Deleting a cluster removes the control plane and all worker nodes, and terminates all workloads running on them.
Deletion is permanent and irreversible. Please back up or migrate all your data before proceeding.
Prerequisites
- A Kubernetes cluster with the status Running and a verified connection via
kubectl
Before deleting
Work through these points whilst the cluster is still running:
-
Back up application data – Back up data that is only stored within the cluster. Stateful components outside the cluster – such as database VMs – are not affected by the deletion.
-
Back up the configuration – Export your manifests if they are not already in version control:
kubectl get all --all-namespaces -o yaml > cluster-backup.yaml -
Backing up Secrets – Credentials and certificates that are only stored within the cluster will be lost.
-
Check external links – DNS records pointing to nodes in this cluster will point to nowhere once they have been deleted.
Delete cluster
There are two ways to access the delete function:
- Actions menu – Top right of the cluster details view, via Destroy
- Settings tab – In the Destroy cluster section, via the Destroy button
The Destroy cluster dialogue box opens:
- The message confirms that the cluster and all worker nodes will be permanently removed.
- To confirm, enter the name of the cluster. Click the copy icon to copy it to the clipboard.
- Optionally, select a reason:
- Performance issues
- A required feature was unavailable
- It was a test and is no longer needed
- Insufficient benefit
- Other
- Confirm by clicking Destroy.
If you select performance issues as the reason, the dialogue box will offer alternatives to deletion – such as expanding the cluster, adding more storage, adding further nodes or contacting support. In the event of capacity bottlenecks, making adjustments is often a better solution than rebuilding the system from scratch.
What is deleted
| Resource | Behaviour |
|---|---|
| Control Plane | Is removed |
| Worker nodes in all node pools | Are removed |
| Workloads in the cluster | Are terminated |
| Configuration file | Becomes invalid |
What can remain
Some resources are not part of the cluster and may remain in place – in which case they will continue to be billed. Please check the following after deletion:
- VPC networks that continue to be used by other resources
- Data in S3 Object Storage that exists independently of the cluster
- Resources outside the cluster, such as database VMs in the same VPC
Removing individual resources rather than the entire cluster
Often, a minor procedure is sufficient:
| Objective | Procedure |
|---|---|
| Reduce costs | Reduce the number of nodes or enable autoscaling; see Enable autoscaling |
| Replace an individual faulty node | Recycle; see Node Remediation |
| Remove an unused node pool | Via the Kebab menu in the Resources tab |
| Remove an application | kubectl delete or helm uninstall |