podAntiAffinityTopologyKey¶
Feature state: 1.0.0
podAntiAffinityToplologyKey
sets the TopologyKey to use for automatic podAntiAffinity
rules.
Note
By default podAntiAffinityTopologyKey
is set to kubernetes.io/hostname
.
Define podAntiAffinity with zone toplogy key
values.yaml | |
---|---|
In the above example three replicas of application would prefer to be scheduled on Kubernetes nodes spread in different availability zones.
For more examples please see the Best practices linked below.
See also: