Node_Affinity_Rules
Node Affinity Rules
Where Pod affinity/anti-affinity has to do with other Pods, the use of nodeAffinity allows Pod scheduling based on node labels. This is similar and will some day replace the use of the nodeSelector setting. The scheduler will not look at other Pods on the system, but the labels of the nodes. This should have much less performance impact on the cluster, even with a large number of nodes.
- Uses
In,NotIn,Exists,DoesNotExistoperators requiredDuringSchedulingIgnoredDuringExecutionpreferredDuringSchedulingIgnoredDuringExecutionrequiredDuringSchedulingRequiredDuringExecution.
Until nodeSelector has been fully deprecated, both the selector and required labels must be met for a Pod to be scheduled.