Use Node Affinity in Kubernetes
Use Node Affinity in KubernetesNode affinity is a set of rules. It is used by the scheduler to decide where a pod can be placed in the cluster. The rules are defined using labels on nodes and label selectors specified in pods definition. Node affinity allows a pod to specify an affinity towards a group of nodes it can be scheduled on. We can limit a Pod to only be able to run on a particular Node(s). nodeSelector is the simplest form of node selection constraint. nodeSelector is a property of PodSpec. For the pod to be eligible to run on a node, the node must have each of the indicated labels.
Read More »