Delete a Cluster on VMware vSphere

Run the following command from a machine where ac is logged in to the platform. Delete the cluster with --reclaim-disks, so that its persistent disks are deleted with it:

ac config use-cluster global
ac adm alpha cluster destroy --dir <install-dir> --reclaim-disks     # preferred: manifests/ records what ac rendered
ac adm alpha cluster destroy --cluster <cluster-name> --reclaim-disks # without the directory

destroy lists what it will delete and asks you to type the cluster name; --yes skips the prompt and is required when standard input is not a terminal. If it is interrupted, run it again; it resumes where it stopped.

Without --reclaim-disks, the persistent disks stay allocated in the datastore after the cluster is gone, with nothing left to delete them. Resume a destroy that was started with --reclaim-disks with the same flag.

destroy removes only objects that carry the cluster's ownership label. The vCenter folders, datastores, port groups, and templates are left in place. The provider deletes the credential Secret with the cluster, so create it again before you recreate the cluster. --cluster global is refused.

If the Cluster stays in Deleting, see Troubleshoot a Cluster Stuck in Deleting.