Kubernetes

Delete a Cluster

Remove a Kubernetes cluster and all its resources.

Deleting a Kubernetes cluster removes the hosted control plane, all worker node VMs, and associated resources. This operation is irreversible.

Understand deletion

When you delete a cluster, the platform:

  1. Removes the hosted control plane: the API server, etcd, controller-manager, and scheduler pods are deleted from the management cluster.
  2. Drains worker nodes: pods on worker nodes are evicted to allow graceful shutdown of workloads.
  3. Deletes worker VMs: all VMs provisioned for the cluster's node pools are permanently deleted, including their disks.
  4. Releases network resources: IP addresses assigned to worker nodes are released.
  5. Cleans up Cluster API resources: the Machine, MachineDeployment, and Cluster CRDs are removed from the management cluster.
Deletion is permanent. All data stored on worker node disks (including PersistentVolumes backed by local storage) is lost. Make sure you have backed up any important data before proceeding.

What is not deleted:

  • External resources: PersistentVolumes backed by external storage systems, load balancers, or DNS records that were created by workloads running on the cluster are not automatically cleaned up. You are responsible for removing those.
  • Container images: images in external registries are not affected.

Delete the cluster

  1. Navigate to Kubernetes in the portal.
  2. Find the cluster you want to delete.
  3. Click the Delete action and confirm.

The Kubernetes overview lists all clusters with their status and node count.

The cluster transitions to the Deleting state while resources are being cleaned up. Once deletion is complete, the cluster disappears from the list.

Deletion can take several minutes, especially for clusters with many nodes. The platform needs to drain workloads, shut down VMs, and clean up storage.
Before deleting a production cluster, consider exporting any important Kubernetes resources (ConfigMaps, Secrets, custom resources) that you might need to recreate later. A quick kubectl get all -A -o yaml > backup.yaml can save you from headaches.