To delete a Tanzu Kubernetes Grid management cluster, run the
tkg delete management-cluster command.
When you run
tkg delete management-cluster, Tanzu Kubernetes Grid creates a temporary
kind cleanup cluster on your bootstrap environment to manage the deletion process. The
kind cluster is removed when the deletion process completes.
To list all of the management clusters are running, run the
tkg get management-cluster command.
tkg get management-cluster
The management cluster context that is the current context of the Tanzu Kubernetes Grid CLI and
kubectl is marked with an asterisk (
MANAGEMENT-CLUSTER-NAME CONTEXT-NAME my-vsphere-mgmt-cluster * vsphere-mgmt-cluster-admin@vsphere-mgmt-cluster my-aws-mgmt-cluster aws-mgmt-cluster-admin@aws-mgmt-cluster
If there are management clusters that you no longer require, run
tkg delete management-cluster.
You must specify the name of the management cluster to delete.
tkg delete management-cluster my-aws-mgmt-cluster
To skip the
yes/no verification step when you run
tkg delete management-cluster, specify the
tkg delete management-cluster my-aws-mgmt-cluster --yes
If there are Tanzu Kubernetes clusters running in the management cluster, the delete operation is not performed.
In this case, you can delete the management cluster in two ways:
tkg delete clusterto delete all of the running clusters and then run
tkg delete management-clusteragain.
tkg delete management-clusterwith the
tkg delete management-cluster my-aws-mgmt-cluster --force
IMPORTANT: Do not change context or edit the
.kube-tkg/config file while Tanzu Kubernetes Grid operations are running.