top of page

Cleanup Failed Cluster Deployment (TKG/TCE)

  • Writer: William B
    William B
  • Jan 21, 2022
  • 1 min read

Updated: Jan 28, 2022

I was recently deploying a management cluster in my TCE lab, and the deployment failed:

ree

Running the tanzu management-cluster delete command will normally cleanup the deployment, deleting the TCE VM`s.


But sometimes there are leftover objects inside the Tanzu system that do not get deleted and its a good idea to clean these up after a failed deployment. This will limit garbage objects and clutter that could cause confuse administration in the long term. The output above shows some kubectl commands that you can run to debug the k8s side of things.


You can use this to view the KIND bootstrap cluster kubectl event logs:

kubectl get events -n tkg-system
ree

1.) Delete the failed deployment

tanzu management-cluster delete
ree

2.) Find and Delete KIND Clusters


TCE creates a KIND cluster initially and then uses that to bootstrap the management cluster deployment. Locate and delete these.

kind get clusters
kind delete cluster --name tkg-kind-c7labdi4nsfn9a8vdl90
ree

3.) Remove all containers

docker rm -f $(docker ps -aq)

4.) Remove all container images

docker rmi -f $(docker images -aq)
ree

5.) Remove all orphaned volumes

docker system prune --all --volumes -f
ree




Comments


© 2021 SEVENLOGIC.IO

bottom of page