pod affinity

Rules that place a pod near, or with anti-affinity away from, other pods that carry certain labels, measured within a topology such as a node or zone.

In more detail

Affinity keeps chatty workloads together; anti-affinity keeps replicas apart so one failure does not take them all. Hard anti-affinity with more replicas than domains leaves the extra pods Pending. Topology spread constraints are often a gentler way to balance replicas.

Related terms

Taught in

References