A topology key selects the node-label values Kubernetes treats as equivalent domains when spreading Pods. Using kubernetes.io/hostname makes each uniquely labeled node a separate spreading domain. section 8.2.1
Use a topology key with topology spread constraints to control placement:
- Verify that every target node has the selected label; Kubernetes platforms are not guaranteed to provide even well-known labels. section 8.2.1
- Choose kubernetes.io/hostname for node-level spreading, then control imbalance with maxSkew and failure behavior with whenUnsatisfiable. section 8.2.1
Spreading three replicas across nodes
A Deployment with three replicas, topologyKey kubernetes.io/hostname, maxSkew 1, and ScheduleAnyway asks Kubernetes to distribute replicas across labeled nodes while still scheduling when perfect spreading is impossible.

