美文网首页
Tanints and Tolerations

Tanints and Tolerations

作者: 上海马超23 | 来源:发表于2020-03-01 16:01 被阅读0次

    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肯定会调度到指定Label的Node上,taints保证别的pod不会调度到这个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.

    相关文章

      网友评论

          本文标题:Tanints and Tolerations

          本文链接:https://www.haomeiwen.com/subject/ufpckhtx.html