zoukankan      html  css  js  c++  java
  • NoSchedule

    root@ubuntu:~/kube-batch# kubectl describe pod qj-1-7zc5k 
    Name:           qj-1-7zc5k
    Namespace:      default
    Priority:       0
    Node:           <none>
    Labels:         controller-uid=0afdbf23-3b59-438d-8c35-b72c6dcb1c21
                    job-name=qj-1
    Annotations:    scheduling.k8s.io/group-name: qj-1
    Status:         Pending
    IP:             
    IPs:            <none>
    Controlled By:  Job/qj-1
    Containers:
      busybox:
        Image:      busybox
        Port:       <none>
        Host Port:  <none>
        Requests:
          cpu:        1
        Environment:  <none>
        Mounts:
          /var/run/secrets/kubernetes.io/serviceaccount from default-token-cfr6q (ro)
    Volumes:
      default-token-cfr6q:
        Type:        Secret (a volume populated by a Secret)
        SecretName:  default-token-cfr6q
        Optional:    false
    QoS Class:       Burstable
    Node-Selectors:  <none>
    Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                     node.kubernetes.io/unreachable:NoExecute for 300s
    Events:          <none>
    root@ubuntu:~/kube-batch# kubectl get nodes --show-label
    Error: unknown flag: --show-label
    See 'kubectl get --help' for usage.
    root@ubuntu:~/kube-batch# kubectl get nodes -show-label
    Unable to connect to the server: dial tcp: lookup how-label on 8.8.8.8:53: no such host
    root@ubuntu:~/kube-batch# kubectl get nodes -show-labels
    Unable to connect to the server: dial tcp: lookup how-labels on 8.8.8.8:53: no such host
    root@ubuntu:~/kube-batch# kubectl get nodes --show-labels
    NAME      STATUS   ROLES    AGE     VERSION   LABELS
    bogon     Ready    <none>   3d20h   v1.18.1   beta.kubernetes.io/arch=arm64,beta.kubernetes.io/os=linux,kubernetes.io/arch=arm64,kubernetes.io/hostname=bogon,kubernetes.io/os=linux
    centos7   Ready    master   3d20h   v1.18.1   beta.kubernetes.io/arch=arm64,beta.kubernetes.io/os=linux,kubernetes.io/arch=arm64,kubernetes.io/hostname=centos7,kubernetes.io/os=linux,node-role.kubernetes.io/master=
    cloud     Ready    master   3d20h   v1.21.1   beta.kubernetes.io/arch=arm64,beta.kubernetes.io/os=linux,kubernetes.io/arch=arm64,kubernetes.io/hostname=cloud,kubernetes.io/os=linux,node-role.kubernetes.io/master=
    ubuntu    Ready    master   3d20h   v1.18.1   beta.kubernetes.io/arch=arm64,beta.kubernetes.io/os=linux,kubernetes.io/arch=arm64,kubernetes.io/hostname=ubuntu,kubernetes.io/os=linux,node-role.kubernetes.io/master=
    root@ubuntu:~/kube-batch# 

    概念

    您可以使用命令 kubectl taint 给节点增加一个污点。比如,

    kubectl taint nodes node1 key1=value1:NoSchedule
    

    给节点 node1 增加一个污点,它的键名是 key1,键值是 value1,效果是 NoSchedule。 这表示只有拥有和这个污点相匹配的容忍度的 Pod 才能够被分配到 node1 这个节点。

    若要移除上述命令所添加的污点,你可以执行:

    kubectl taint nodes node1 key1=value1:NoSchedule-
  • 相关阅读:
    Linux中gdb 查看core堆栈信息
    爱因斯坦名言
    Symbian OS 源码下载方式
    Windows 2003+VS2005+SP1 “无法使用此产品的安装源,请确认安装源存在,并且您可以访问它”的错误
    Visual Studio 2012 Ultimate RTM 序列号
    STL容器erase的使用陷阱
    C++ 迭代器失效
    C++ 类的静态成员详细讲解[静态成员变量链接错误]
    Ubuntu 启动黑屏解决
    android中KSOAP2中的anytype{}问题
  • 原文地址:https://www.cnblogs.com/dream397/p/14972185.html
Copyright © 2011-2022 走看看