Toleration
Taint 与 Toleration 关系简介
设置
pod.spec.tolerations
tolerations:
- key: "key1"
operator: "Equal"
value: "value1"
effect: "NoSchedule"
tolerationSeconds: 3600
- key: "key1"
operator: "Equal"
value: "value1"
effect: "NoExecute"
- key: "key2"
operator: "Exists"
effect: "NoSchedule"说明
当不指定 key 值时,表示容忍所有的污点 key:
当不指定 effect 值时,表示容忍所有的污点作用
有多个 Master 存在时,防止资源浪费,可以如下设置(表示k8s将尽量避免将Pod调度到具有该污点的Node上)
Demo
Last updated