Kubernetes删除一直Terminating状态的namespace
程序员文章站
2024-03-11 10:06:13
...
方法一
方法一:
# kubectl delete ns xxx --grace-period=0 --force
方法二
方法二:
# kubectl edit ns xxx
{
"kind": "Namespace",
"apiVersion": "v1",
"metadata": {
"name": "xxx",
"selfLink": "/api/v1/namespaces/openshift",
"uid": "0a659292-94af-11e5-855c-42010af00002",
"resourceVersion": "14645862",
"creationTimestamp": "2015-11-27T02:32:01Z",
"deletionTimestamp": "2015-12-25T03:20:25Z",
"annotations": {
"openshift.io/sa.scc.mcs": "s0:c6,c0",
"openshift.io/sa.scc.supplemental-groups": "1000030000/10000",
"openshift.io/sa.scc.uid-range": "1000030000/10000"
}
},
"spec": {
"finalizers": [
"openshift.io/origin"
]
},
"status": {
"phase": "Terminating"
}
}
将finalizers数组配置为空数组,退出edit即可
参考链接:
https://github.com/kubernetes/kubernetes/issues/19317
方法三
查看此空间是否还有没有删除的资源,删除之后再删此空间
推荐阅读
-
Kubernetes删除一直Terminating状态的namespace
-
Kubernetes强制删除一直处于Terminating状态的pod,namespace
-
Kubernetes:强制删除一直处于Terminating状态的pod,deployment,namespace,server
-
k8s删除Terminating状态的命名空间
-
k8s删除pod一直处于terminating状态
-
k8s 删除pod 一直卡在 pod 处于Terminating 销毁状态
-
删除ns,一直处于Terminating状态中
-
kubernetes删除namespace进入Terminating状态的排查过程