Delete a managed cluster

This topic tells you how to delete a cluster that you no longer want to manage with Tanzu Platform for Kubernetes.

Before you begin

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:

Delete a cluster

You can remove a cluster from Tanzu Platform using either the hub or the Tanzu CLI.

Tanzu Platform hub
Perform the following steps in Tanzu Platform hub:
  1. In Tanzu Platform hub, select the project that contains the cluster you want to remove.
  2. In the left navigation pane, click to expand Infrastructure, and then click Kubernetes Clusters.
  3. On the Cluster Groups tab of the Kubernetes Clusters page, click the cluster group that contains the cluster you want to remove.
  4. In the list of clusters on the cluster group detail page, locate the cluster you want to remove.
  5. Click to select the cluster, and then click Delete.
  6. 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.

  7. Enter the name of the cluster, and then click Delete.

Tanzu CLI
Run the following commands in a command window:

To delete a cluster using the tanzu CLI:

  1. Make sure your context is set appropriately.
  2. Run the following command, replacing <my-cluster> with the name of your cluster:

    tanzu operations cluster delete <my-cluster>
    
  3. 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.

check-circle-line exclamation-circle-line close-line
Scroll to top icon