Kubernetes namespace stuck at “terminating”

Dec 14th, 2020 | Filed under Uncategorized

Most of the time you do not want to simply force deletion of given namespace. If there are some resources hanging you do want to clean them up first. Especially if you share your cluster with other teams. Why?

Imagine you will force delete your namespace (meaning someone else will be able to create namespace with such name). They might gain access to leftovers you did not bother to clean.

Ok how to find leftovers that blocks namespace from deletion?

kubectl api-resources  --verbs=list --namespaced -o name | xargs -n 1 kubectl get --show-kind --ignore-not-found -n $namespace

Inspect each case one by one.

Sometimes that problems comes from buggy kubernetes package. For instance Percona Helm charts is always giving me that problem which is also reported in theirs jira.

No comments yet.

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image