Tanints and Tolerations

Tanints and Tolerations

Node affinity is a property of pods that attracts them to a set of nodes.Taints are the opposite - they allow a node to repel a set of pods.

Taints and toleratins work togerther to ensure that pods are not scheduled onto inapporpriate nodes.One or more taints are applied to a node;this marks that the node should not accept any pods that do not tolerate the taints.Tolerations are applied to pods,and allow the pods to schedule onto nodes with matching taints.
NodeSelector保證pod肯定會調(diào)度到指定Label的Node上,taints保證別的pod不會調(diào)度到這個Node上

Concepts

Alternatively,you can use effect of PerferNoSchedule.This is a "preference" or "soft" version of NoSchedule - the system will try to avoid placing a pod that does not tolerate the taint on the node,but it is not required.

  • if there is at least one un-ignored taint with effect NoSchedule then Kubernetes will not schedule the pod onto that node
  • if there is no un-ignored taint with effect NoSchedule but there is at least one un-ignored taint with effect PreferNoSchedule then Kubernetes will try to not scheuld the pod onto the node
  • if there is at least one un-ignored taint with effect NoExecute then the pod will be evicted from the node,and will not be scheduled onto the node.
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容