VMware : Tips of the week #6

Quick tip to show you how to fix Kubernetes namespace deleting stuck in terminating state: 

In this case, you can manually delete your namespace that is stuck in the Terminating state:

STEP 1 : Create a temporary JSON file:

kubectl get namespace kasten-io -o json > tmp-kasten-io.json

STEP 2 : Edit your tmp.json file and remove the kubernetes value from the finalizers array and save the file.

STEP 3 : Executing the cleanup command

kubectl replace –raw “/api/v1/namespaces/kasten-io/finalize” -f tmp-kasten-io.json

The namespace should now be absent from your namespaces list.

Enjoy! 

Leave a Reply

Your email address will not be published. Required fields are marked *