Namespace/TKC stuck in deletion phase
search cancel

Namespace/TKC stuck in deletion phase

book

Article ID: 382297

calendar_today

Updated On:

Products

VMware vSphere with Tanzu

Issue/Introduction

When attempting to delete a TKC this can sometimes get stuck in a deletion phase, if there are still objects remaining for cluster

Environment

vSphere IAAS

Cause

Deletions can get stuck when correct steps are not used for delelion e.g Deleting namespace from UI before removing cluster. Running below command will provide a list of what may be holding up the deletion of the cluster.

kubectl api-resources --namespaced -o name | paste -d ',' -s | xargs kubectl get -n <ns>


From below we can see objects that are holding up the deletion.

kubectl api-resources --namespaced -o name | paste -d ',' -s | xargs kubectl get -n <namespace>
 

NAME PHASE AGE VERSION
cluster.cluster.x-k8s.io/<cluster name> Deleting 31d  

 

NAME CLUSTER INITIALIZED API SERVER AVAILABLE REPLICAS READY UPDATED UNAVAILABLE AGE VERSION

kubeadmcontrolplane.controlplane.cluster.x-k8s.io/<cluster name>-control-plane

/<cluster name>

true true 1 0 1 1 0 31d

v1.28.7+vmware.1-fips.1

 

NAME CONTROL PLANE WORKER TKR NAME AGE READY TKR COMPATIBLE UPDATES AVAILABLE
tanzukubernetescluster.run.tanzu.vmware.com/<cluster name> 1   v1.28.7---vmware.1-fips.1-tkg.1 31D False True  

 

Resolution

Objects can be removed manually by deleting objects listed from kubectl api-resources --namespaced -o name | paste -d ',' -s | xargs kubectl get -n <namespace>

Please contact Broadcom support for further instructions on deleting the objects preventing the namespace/TKC from being deleted.