Scheduling and scaling, topic 36 of 61
Topology spread constraints
Optional
Three replicas in one zone are lost together when the zone fails. A topology spread constraint tells the scheduler to keep the number of matching Pods per zone, or per node, within maxSkew of each other.
With whenUnsatisfiable: DoNotSchedule it is a rule; with ScheduleAnyway it is a preference. It works from node labels such as topology.kubernetes.io/zone, and it balances when Pods are scheduled, not afterwards.
On Opsfolk
Nothing of ours for this topic yet: an article is on its way.
Elsewhere
- Pod topology spread constraintsOfficial