zoukankan      html  css  js  c++  java
  • 记录一次namespace 处于Terminating状态的处理方法

    现象:

    [root@master kube-prometheus]# kubectl get namespaces -o wide
    NAME                STATUS        AGE
    cattle-logging      Active        174m
    cattle-prometheus   Active        12h
    cattle-system       Active        15h
    default             Active        8d
    kube-node-lease     Active        8d
    kube-public         Active        8d
    kube-system         Active        8d
    monitoring          Terminating   11m

    解决:

    [root@master kube-prometheus]# kubectl delete namespace monitoring  --force --grace-period=0
    warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
    Error from server (Conflict): Operation cannot be fulfilled on namespaces "monitoring": The system is ensuring all content is removed from this namespace.  Upon completion, this namespace will automatically be purged by the system.
    [root@master kube-prometheus]# NAMESPACE=monitoring
    [root@master kube-prometheus]# kubectl proxy &
    [1] 973
    [root@master kube-prometheus]# Starting to serve on 127.0.0.1:8001

    新开一个链接:

    [root@master helm]# kubectl get namespace $NAMESPACE -o json |jq '.spec = {"finalizers":[]}' >temp.json
    [root@master helm]# curl -k -H "Content-Type: application/json" -X PUT --data-binary @temp.json 127.0.0.1:8001/api/v1/namespaces/$NAMESPACE/finalize
    [root@master helm]# kubectl get ns
    NAME                STATUS   AGE
    cattle-logging      Active   178m
    cattle-prometheus   Active   12h
    cattle-system       Active   15h
    default             Active   8d
    kube-node-lease     Active   8d
    kube-public         Active   8d
    kube-system         Active   8d
    [root@master helm]# kubectl get ns
    NAME                STATUS   AGE
    cattle-logging      Active   178m
    cattle-prometheus   Active   12h
    cattle-system       Active   15h
    default             Active   8d
    kube-node-lease     Active   8d
    kube-public         Active   8d
    kube-system         Active   8d

    发现已经解决了

  • 相关阅读:
    asp.net 使用urlrewrite之后的form postback
    WebService来获取Context.User.Identity.Name为空的问题?
    求救:C#的一个绘图问题
    flex 使用webservice的域访问问题
    请教大家一个问题,有关于数据库的设计
    C# 中使用结构体
    Discuz Nt 3.0开启Memcached 以及二次开发监控Memcached状态
    Flex 中对xml数据的处理
    Oracle alert log 按天 存放 脚本
    Asktom Oracle:On Caching and Evangelizing SQL
  • 原文地址:https://www.cnblogs.com/dalianpai/p/12172774.html
Copyright © 2011-2022 走看看