九 pod:污点taint 与容忍度tolerations( 四 )

查看pod,一个节点有两个污点值 , 但是yaml文件只容忍一个,所以pod创建不成功 。
[root@k8scloude1 pod]# kubectl get pods -o wideNAMEREADYSTATUSRESTARTSAGEIPNODENOMINATED NODEREADINESS GATESpod10/1Pending08s<none><none><none><none>[root@k8scloude1 pod]# kubectl delete pod pod1 --forcewarning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.pod "pod1" force deleted[root@k8scloude1 pod]# kubectl get pods -o wideNo resources found in pod namespace.取消k8scloude2污点
[root@k8scloude1 pod]# kubectl describe nodes k8scloude2 | grep -A2 TaintsTaints:wudian=true:NoSchedulezang=shide:NoScheduleUnschedulable:false#取消污点[root@k8scloude1 pod]# kubectl taint node k8scloude2 zang-node/k8scloude2 untainted[root@k8scloude1 pod]# kubectl taint node k8scloude2 wudian-node/k8scloude2 untainted[root@k8scloude1 pod]# kubectl describe nodes k8scloude1 | grep -A2 TaintsTaints:node-role.kubernetes.io/master:NoScheduleUnschedulable:falseLease:[root@k8scloude1 pod]# kubectl describe nodes k8scloude2 | grep -A2 TaintsTaints:<none>Unschedulable:falseLease:[root@k8scloude1 pod]# kubectl describe nodes k8scloude3 | grep -A2 TaintsTaints:<none>Unschedulable:falseLease:Tips:如果自身机器有限,只能有一台机器 , 则可以把master节点的污点taint取消,就可以在master上运行pod了 。
【九 pod:污点taint 与容忍度tolerations】

推荐阅读