What Is Node Affinity?
Node affinity is a set of scheduling constraints that express which nodes a pod prefers or requires, based on node labels. Rules can be hard, meaning the pod will not schedule without a match, or soft, meaning the scheduler tries to honor them but proceeds otherwise. It is the label-driven successor to simple node selectors.
Why it matters
Node affinity steers workloads onto the right hardware or availability zone, for example pinning a job to nodes with a specific CPU architecture. Soft rules let teams express preferences without risking unschedulable pods.
Related guides
What Is Pod Affinity?Pod affinity and anti-affinity are Kubernetes rules that schedule pods near or away from other pods based on…
What Are Taints and Tolerations?Taints and tolerations are a Kubernetes mechanism that lets a node repel pods unless those pods explicitly to…
What Is a Horizontal Pod Autoscaler?A horizontal pod autoscaler is a Kubernetes controller that adds or removes pod replicas for a workload based…