Categories
Uncategorized

Kubernetes namespace stuck at “terminating”

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.

Leave a Reply

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

+ 8 = 9