Delete a managed cluster¶
Due to a development limitation in baremetal-operator
,
deletion of a managed cluster requires preliminary deletion
of the worker machines running on the cluster.
Warning
Mirantis recommends deleting cluster machines using the Container Cloud web UI or API instead of using the provider tools directly. Otherwise, the cluster deletion or detachment may hang and additional manual steps will be required to clean up machine resources.
Using the Container Cloud web UI, first delete worker machines one by one until you hit the minimum of 2 workers for an operational cluster. After that, you can delete the cluster with the remaining workers and managers.
To delete a baremetal-based managed cluster:
Log in to the Container Cloud web UI with the
m:kaas:namespace@operator
orm:kaas:namespace@writer
permissions.Switch to the required project using the Switch Project action icon located on top of the main left-side navigation panel.
In the Clusters tab, click the required cluster name to open the list of machines running on it.
Click the More action icon in the last column of the worker machine you want to delete and select Delete. Confirm the deletion.
Repeat the step above until you have 2 workers left.
In the Clusters tab, click the More action icon in the last column of the required cluster and select Delete.
Verify the list of machines to be removed. Confirm the deletion.
If the cluster deletion hangs and the Deleting status message does not disappear after a while, refer to Container Cloud documentation: Troubleshooting - Cluster deletion or detachment freezes to fix the issue.
Optional. Available since MOSK 23.2. If you do not plan to reuse the bare metal hosts of the deleted cluster, delete them:
In the BM Hosts tab, click the Delete action icon next to the name of the host to be deleted.
Confirm the deletion.
Caution
Credentials associated with the deleted bare metal host, if any, are deleted automatically.
Optional. Applies before MOSK 23.2. If you do not need credentials associated with the bare metal hosts of the deleted cluster, delete them manually:
kubectl delete baremetalhostcredential <credentialName>
Deleting a cluster automatically frees up the resources allocated for this cluster, for example, instances, load balancers, networks, floating IPs, and so on.