How to remove namespace stuck in Terminating state in Kubernetes
1 min read
Having trouble deleting a Kubnernetes namespace? It might be stuck in a Terminating state. Here’s how to identify and fix the issue.
Dump the contents of the namespace to a temporary file:
Edit the temporary file in your favourite editor
Remove "kubernetes" from the finalizer array and save the file
Start the proxy (if you haven’t already)
Call the Kubernetes API application/json against the /finalize endpoint for the namespace to update the JSON. Use the port number appropriate for your instance.