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-
  • 相关阅读:
    运算符、流程控制
    python数据类型
    Python入门基础
    pandas教程1:pandas数据结构入门
    使用matplotlib绘制多轴图
    使用matplotlib快速绘图
    浙江省新高中信息技术教材,将围绕Python进行并增加编程相关知识点
    [转]ubuntu搭建LAMP环境
    [转]字体精简
    [转]安装PIL时注册表中找不到python2.7
  • 原文地址:https://www.cnblogs.com/dream397/p/14972185.html
Copyright © 2011-2022 走看看