VMware Modern Apps Community
bdamian
Expert
Expert
Jump to solution

TKG 1.5.1 delete cluster stuck

Hi, I've tried to delete a TKG cluster with:

tanzu cluster delete tkg-demo

but the cluster is never deleted.

bdamian_0-1649446429704.png

What can I check?

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian
Labels (1)
0 Kudos
1 Solution

Accepted Solutions
bdamian
Expert
Expert
Jump to solution

The reason for this is a bug in 1.5.1 version. Sometimes when you execute the delete command, the AKO secret is deleted before the objects on NSX Advanced Load Balancer so it cannot delete the objects. So it hangs on "deleting".

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian

View solution in original post

6 Replies
VMdunne
VMware Employee
VMware Employee
Jump to solution

Can you describe the machinedeployment?

$kubectl get md 

$kubectl describe <NAME-OF-MD> 

0 Kudos
VMdunne
VMware Employee
VMware Employee
Jump to solution

The machinedeployment object is part of the managment cluster so you will need to use the managment cluster context.

https://docs.vmware.com/en/VMware-Tanzu-Kubernetes-Grid/1.5/vmware-tanzu-kubernetes-grid-15/GUID-mgm...

0 Kudos
VMdunne
VMware Employee
VMware Employee
Jump to solution

Cluster delete is stuck in Deleting state.

  • Verify all VM's are gone
  • Verify AVI VIP got cleaned up
  • delete any avi finalizers on cluster:

    kubectl config use-context management-cluster
    kubectl get cluster -A
    kubectl edit cluster [cluster-to-delete]
    #search for finalizer and delete

 

 

0 Kudos
bdamian
Expert
Expert
Jump to solution

The reason for this is a bug in 1.5.1 version. Sometimes when you execute the delete command, the AKO secret is deleted before the objects on NSX Advanced Load Balancer so it cannot delete the objects. So it hangs on "deleting".

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian
anilspp
Enthusiast
Enthusiast
Jump to solution

Thanks for sharing.

0 Kudos
ejfv
Contributor
Contributor
Jump to solution

It seems that we are affected by this bug.

How we can get this cluster deleted?

0 Kudos