How to manually remove finalizers from a namespace?
It is quite a common occurence for a namespace to be stuck in a “Terminating” state. This is because the namespace has finalizers attached to it that do not want to finalize, usually for a good reason. But if you are just experimenting, you might just want this namespace to disappear. Here are some manual steps to do that (NB: do it at your own risks, no warranty it will work for you, disclaimer, yadi yada):
In one terminal, run
kubectl proxy. In another terminal, run the
Edit the JSON file. You should see something like that:
Remove everything in the “finalizers” list. Then run this command:
The namespace should be terminated now.