Node_Affinity_Rules
Node Affinity Rules
Where Pod
affinity/anti-affinity has to do with other Pod
s, 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 Pod
s 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
,DoesNotExist
operators requiredDuringSchedulingIgnoredDuringExecution
preferredDuringSchedulingIgnoredDuringExecution
requiredDuringSchedulingRequiredDuringExecution
.
Until nodeSelector
has been fully deprecated, both the selector and required labels must be met for a Pod to be scheduled.