Deleting a Cluster namespace stuck in terminating state in Kubernetes
- bansalreepa999
- Oct 6, 2022
- 1 min read
When I tried to delete a workload cluster it did not get deleted , deletion failed.
Reason being workload cluster namespace got stuck in terminating state.

Below three steps need to be executed to delete the cluster namespace that is in terminating state.
1. kubectl get ns ci-xom-ccs-01 -o json > temp123.json
where ci-xom-ccs-01 is the cluster namespace.
2. vi temp123.json and delete the Kubernetes word from the file and save it.
3. kubectl replace --raw "/api/v1/namespaces/ci-xom-ccs-01/finalize" -f temp123.json
After we delete the workload cluster namespace stuck in terminating state, we were able to delete the workload cluster from TCA Manager.

Comments