命名空间“卡住"作为终止,如何删除它? [英] Namespace "stuck" as Terminating, How do I remove it?

查看:298
本文介绍了命名空间“卡住"作为终止,如何删除它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经删除了一个卡住"的命名空间,并以这种永恒的终止"状态显示.

I've had a "stuck" namespace that I deleted showing in this eternal "terminating" status.

推荐答案

假定您已经尝试强制删除以下资源: 豆荚处于终止状态,而您竭尽全力地尝试恢复名称空间...

Assuming you've already tried to force-delete resources like: Pods stuck at terminating status, and your at your wits' end trying to recover the namespace...

您可以强制删除名称空间(也许留下悬挂的资源):

You can force-delete the namespace (perhaps leaving dangling resources):

(
NAMESPACE=your-rogue-namespace
kubectl proxy &
kubectl get namespace $NAMESPACE -o json |jq '.spec = {"finalizers":[]}' >temp.json
curl -k -H "Content-Type: application/json" -X PUT --data-binary @temp.json 127.0.0.1:8001/api/v1/namespaces/$NAMESPACE/finalize
)

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆