Delete a Cluster on Bare Metal

Run the following command from a machine where ac is logged in to the platform:

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

destroy lists what it will delete and asks you to type the cluster name. --yes skips this prompt. It is required when standard input is not a terminal. The hosts are cleaned and returned to their pools. If the command is interrupted, run it again. It resumes where it stopped.

destroy removes only the objects that carry the ownership label of the cluster. It leaves the MachineRegistration, the SeedImage, the pools, and the MachineInventory objects in place. The hosts stay in the pools. To make them available to other clusters, delete the pools. The command rejects --reclaim-disks on Bare Metal, and it refuses --cluster global.

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