美文网首页Kubernetes相关
2019-06-27 Kubernetes删除namespace

2019-06-27 Kubernetes删除namespace

作者: 胡生生 | 来源:发表于2019-06-27 09:40 被阅读0次
方法一:
# 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
方法三:
查看此空间是否还有没有删除的资源,删除之后再删此空间

相关文章

网友评论

    本文标题:2019-06-27 Kubernetes删除namespace

    本文链接:https://www.haomeiwen.com/subject/rrweqctx.html