Use the Forget this cluster option to forcibly remove a cluster from your VMware Tanzu Mission Control organization.
When you provision or attach a cluster, Tanzu Mission Control installs cluster agent extensions on the cluster and registers the cluster with the Tanzu Mission Control cluster agent service. For more information, see What Happens When You Attach a Cluster in VMware Tanzu Mission Control Concepts.
In contrast, when you detach a cluster without the Forget this cluster option, Tanzu Mission Control tells the cluster agent extensions to uninstall themselves, and then removes the cluster from the cluster agent registry for your organization. Similarly when you use the standard delete of a provisioned cluster, Tanzu Mission Control deletes the cluster from your cloud provider before removing it from the cluster agent registry for your organization.
Unless you have reason to forcibly remove this cluster from your organization, use the standard detach or delete without the Forget this cluster option.
- You have attempted to delete the cluster and it appears to be stuck in the Deleting state for an extended period of time.
- You want to detach the cluster, but for some reason Tanzu Mission Control cannot communicate with it.
- To detach or delete a cluster, you must be associated with the clustergroup.edit role for the cluster group.
- You must also be associated with the cluster.admin role for the cluster.
- In the left navigation pane of the Tanzu Mission Control console, click Cluster groups.
- On the Cluster groups page, click the cluster group that contains the cluster you want to remove from your organization, and then click the cluster.
- On the cluster detail page, click Actions and then choose the appropriate action from the dropdown.
- For an attached cluster, choose Detach.
- For a provisioned cluster, choose Delete.
- In the confirmation dialog, enter the name of the cluster and then select Forget this cluster.
- Click Forget Cluster.
When you click Forget Cluster, Tanzu Mission Control de-registers the cluster from your organization.
- If you no longer need the cluster, delete it using your cloud provider's tools.
- If you want to keep the cluster, remove the cluster agent extensions.
These kubectl commands remove the Tanzu Mission Control cluster agent extensions from your cluster.
- Open a command window and connect to your cluster with kubectl.
- Use the following kubectl commands to remove the namespace, CRDs, and clusterroles/clusterrolebindings installed by Tanzu Mission Control.
kubectl delete namespace vmware-system-tmc kubectl delete crd extensions.clusters.tmc.cloud.vmware.com kubectl delete crd agents.clusters.tmc.cloud.vmware.com kubectl delete crd extensionresourceowners.clusters.tmc.cloud.vmware.com kubectl delete crd extensionintegrations.clusters.tmc.cloud.vmware.com kubectl delete crd extensionconfigs.intents.tmc.cloud.vmware.com kubectl delete clusterrole extension-updater-clusterrole extension-manager-role agent-updater-role vmware-system-tmc-psp-agent-restricted kubectl delete clusterrolebinding extension-updater-clusterrolebinding extension-manager-rolebinding agent-updater-rolebinding vmware-system-tmc-psp-agent-restricted kubectl delete psp vmware-system-tmc-agent-restricted