Removing a cluster from Tanzu Service Mesh involves unregistering the cluster with its Tanzu Service Mesh SaaS server and uninstalling the Tanzu Service Mesh software components on the cluster. You can remove a cluster from Tanzu Service Mesh using the Tanzu Service Mesh CLI.
Procedure
- To delete the registration YAML applied to the cluster during onboarding and thus unregister the cluster from Tanzu Service Mesh, run the following command.
tanzu sm delete -f {cluster-registration-file-name}.yaml
{cluster-registration-file-name}.yaml
is the name of the registration YAML file.
The output contains a message that the cluster was deleted.
- To verify that the cluster was successfully unregistered from Tanzu Service Mesh, run the following command.
tanzu sm get cluster {cluster-id} | yq .status
null
in the output of the command indicates the cluster was successfully unregistered.
Note:
Because unregistering the cluster takes a few minutes, run the command until you see null
in the output.
- To remove the Tanzu Service Mesh components from the cluster, run the following command.
kubectl delete --ignore-not-found=true -f https://{SaaS-server-host-name}/cluster-registration/k8s/client-cluster-uninstall.yaml
{SaaS-server-host-name}
is the host name in the URL of the Tanzu Service Mesh server with which the cluster was registered during onboarding.
For example, if the cluster was registered with a server at https://my-tsm-prod.servicemesh.biz, run:
kubectl delete --ignore-not-found=true -f https://my-tsm-prod.servicemesh.biz/cluster-registration/k8s/client-cluster-uninstall.yaml