Dennis Zheleznyak

Dennis Zheleznyak

DevOps Engineer bigpanda

© 2021

K8s namespace is stuck at deleting

If you’re trying to delete a namespace and you are stuck with this error for too long:

Error from server (Conflict): Operation cannot be fulfilled on namespaces "aqua-test": The system is ensuring all content is removed from this namespace.  Upon completion, this namespace will automatically be purged by the system.

Enter the following commands to fix it:

kubectl patch ns <NamespaceName> -p '{"metadata":{"finalizers":null}}';

Finally delete the namespace:

kubectl delete ns <NamespaceName>