Pod Specification
Most scheduling decisions can be made as part of the Pod specification. A pod specification contains several fields that inform scheduling, namely:
nodeName
nodeSelector
affinity
schedulerName
tolerations
Learn more about the fields in a Pod specification.
Fields in a Pod Specification
nodeName
and nodeSelector The nodeName and nodeSelector options allow a Pod to be assigned to a single node or a group of nodes with particular labels.
affinity and anti-affinity
Affinity and anti-affinity can be used to require or prefer which node is used by the scheduler. If using a preference instead, a matching node is chosen first, but other nodes would be used if no match is present.
taints and tolerations
The use of taints allows a node to be labeled such that Pods would not be scheduled for some reason, such as the cp node after initialization. A toleration allows a Pod to ignore the taint and be scheduled assuming other requirements are met.
schedulerName
Should none of the options above meet the needs of the cluster, there is also the ability to deploy a custom scheduler. Each Pod could then include a schedulerName to choose which schedule to use.
Last updated