Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k9s plugin to purge namespace by deleting finalizer #135

Closed
gberche-orange opened this issue Jun 21, 2023 · 1 comment
Closed

k9s plugin to purge namespace by deleting finalizer #135

gberche-orange opened this issue Jun 21, 2023 · 1 comment

Comments

@gberche-orange
Copy link
Member

Expected

as an orange-cf-bosh-cli user,
in order to force the deletion of a namespace
I need a k9s plugin to do so

Workaround

# git clone paas templates repo
~/bosh/template/admin/delete-k8s-ns.sh

Other tested alternatives

https://github.com/xcoulon/kubectl-terminate

Limitations:

@ogrand
Copy link
Member

ogrand commented Jun 29, 2023

Should be done with command like:

NAME="<namespace to use>"
kubectl get ns $NAME -o json | tr -d '\n' | sed -e 's/\"finalizers\": \[[^]]\+\]/\"finalizers\": []/' | kubectl replace --raw /api/v1/namespaces/$NAME/finalize -f -

But finally this issue is a little bit dangerous for ops users who may delete namespace by error.
Closed the issue.

@ogrand ogrand closed this as completed Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants