Add `spec.topologySpreadConstraints` to the Pod or Deployment template spec
Set `topologyKey: topology.kubernetes.io/zone` to spread across zones and `labelSelector` to match pods of the same workload
Set `maxSkew: 1` to allow at most a 1-pod imbalance between zones
Choose `whenUnsatisfiable: DoNotSchedule` to enforce the constraint or `ScheduleAnyway` to treat it as a soft preference
Verify distribution with `kubectl get pods -o wide` and check the node zone labels with `kubectl get nodes --show-labels`
Known gotchas
`DoNotSchedule` with `maxSkew: 1` can cause pods to be unschedulable if zones have unequal node capacity — always combine with a pod topology spread that has a `ScheduleAnyway` fallback or ensure zone node counts are balanced
Topology spread constraints use the label selector on existing pods; if pods from a previous rollout generation have different labels, the new pods may compute skew incorrectly
Nodes must have `topology.kubernetes.io/zone` labels populated; unmanaged or on-premises nodes without this label are treated as a single topology domain, defeating the constraint
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp