(默认不启用)checkServiceAffinity:将 同一个service 下的pod 尽可能放在一个Node下
MaxAzureDiskVolumeCount
NoVolumeZoneConflict:
CheckNodeDiskPressure
MatchInterPodAffitnity: pod间的亲和性
https://github.com/kubernetes/kubernetes/tree/master/pkg/scheduler/algorithm/priorities
根据预选与优选 影响pod 的节点选择,主要可以通过污点、pod亲和性、node亲和性。
强约束,条件不满足则pedding
Taints 给予node定义,那些pod可以执行
pod 使用 Tolerations指定容忍的污点
node.spec.taints
FIELDS:
effect <string> -required-
Required. The effect of the taint on pods that do not tolerate the taint.
Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
key <string> -required-
Required. The taint key to be applied to a node.
timeAdded <string>
TimeAdded represents the time at which the taint was added. It is only
written for NoExecute taints.
value <string>
Required. The taint value corresponding to the taint key.
effect: 用于定义排斥的行为:
管理节点污点
kubectl taint NODE NAME KEY_1=VAL_1:TAINT_EFFECT_1 ... KEY_N=VAL_N:TAINT_EFFECT_N [options]
pod.spec.tolerations
可以让pod 容忍 node 上的污点。
FIELDS:
effect <string>
Effect indicates the taint effect to match. Empty means match all taint
effects. When specified, allowed values are NoSchedule, PreferNoSchedule
and NoExecute.
key <string>
Key is the taint key that the toleration applies to. Empty means match all
taint keys. If the key is empty, operator must be Exists; this combination
means to match all values and all keys.
operator <string>
Operator represents a key's relationship to the value. Valid operators are
Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for
value, so that a pod can tolerate all taints of a particular category.
tolerationSeconds <integer>
TolerationSeconds represents the period of time the toleration (which must
be of effect NoExecute, otherwise this field is ignored) tolerates the
taint. By default, it is not set, which means tolerate the taint forever
(do not evict). Zero and negative values will be treated as 0 (evict
immediately) by the system.
value <string>
Value is the taint value the toleration matches to. If the operator is
Exists, the value should be empty, otherwise just a regular string.
原文:https://www.cnblogs.com/pythonPath/p/11267407.html