This topic tells you how to delete a cluster that you no longer want to manage with Tanzu Platform for Kubernetes.
This procedure assumes that you have a workload cluster under management that was added as an existing cluster or a cluster that was created through Tanzu Platform. For self-managed clusters that you want to remove from management, see Detach a managed cluster.
Make sure you have the appropriate permissions to delete a cluster.
Depending on your chosen approach, make sure you have done one of the following:
You can remove a cluster from Tanzu Platform using either the hub or the Tanzu CLI.
In the confirmation dialog, select the method you want to use for removing the cluster.
Select Delete and remove resources to remove the cluster from management and let Tanzu Platform delete the cluster.
Select Manually delete to remove the cluster from management and leave the cluster. You must manually delete the cluster and its resources using the cloud provider’s tools. This method can be useful if your cluster has stopped communicating with Tanzu Platform, or if you want to retain the cluster after removing it from Tanzu Platform management.
Enter the name of the cluster, and then click Delete.
To delete a cluster using the tanzu
CLI:
Run the following command, replacing <my-cluster>
with the name of your cluster:
tanzu operations cluster delete <my-cluster>
To remove a cluster from Tanzu Platform without deleting the cluster, add the --force
flag. For example:
tanzu operations cluster delete <my-cluster> --force
If you use the --force
flag, Tanzu Platform does not attempt to delete the cluster itself. You must manually delete the cluster and its resources using the cloud provider’s tools.