目录
污点
[key]=[value]:[effect]
kubectl describe node k8s-node01
kubectl taint nodes k8s-node01 check=zhang:NoSchedule
污点容忍
key
: 污点的标签
value
: 污点的标签,
operator
: 操作符 Equal/Exists Exists时,将会忽略value;只要有key和effect就行
effect
: 描述污点的作用
NoSchedule
:表示K8S将不会把Pod调度到具有该污点的Node节点上
PreferNoSchedule
:表示K8S将尽量避免把Pod调度到具有该污点的Node节点上
NoExecute
:表示K8S将不会把Pod调度到具有该污点的Node节点上,同时会将Node上已经存在的Pod驱逐出去
tolerationSeconds
:表示pod 能够容忍 effect 值为 NoExecute 的 taint;当指定了 tolerationSeconds【容忍时间】,则表示 pod 还能在这个节点上继续运行的时间长度。
tolerations:
- key: "key"
operator: "Equal"
value: "value"
effect: "NoSchedule"
---
tolerations:
- key: "key"
operator: "Exists"
effect: "NoSchedule"
---
tolerations:
- key: "key"
operator: "Equal"
value: "value"
effect: "NoExecute"
tolerationSeconds: 3600