Topology spread constraints
- Last Updated: April 14, 2026
- 1 minute read
- MarkLogic Server
- Documentation
Topology spread constraints and the actualSkew and maxSkew parameters control the spread of pods among worker nodes and zones in a cluster.
-
actualSkewrepresents the difference between the number of pods in the most populated worker nodes or availability zones, and the number of pods in the least populated worker nodes or availability zones. -
maxSkewrepresents the greatest degree to which pods may be unevenly distributed.
For more information and examples, see GitHub.
The MarkLogic Helm Chart and Operator default to this configuration:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/name: marklogic
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app.kubernetes.io/name: marklogic
In the first rule, topologyKey is set to the hostname. This ensures that MarkLogic pods are scheduled to all the available worker nodes evenly and that maxSkew is not exceeded.
In the second rule, the topologyKey is set to the zone. This setting attempts to schedule the pods onto worker nodes located in different availability zones. If the topologyKey zone has an even distribution, the rule only applies to nodes with the label zone: <any value>. The scheduler skips nodes without a zone label.
When the actualSkew of all the nodes exceeds maxSkew, the rules are unsatisfied. When the rules are unsatisfied, whenUnsatisfiable controls what happens next:
-
If
whenUnsatisfiableis set toDoNotSchedule, the scheduler does not schedule pods to the worker nodes. -
If
whenUnsatisfiableis set toScheduleAnyway, the scheduler schedules pods to the worker nodes. The scheduler schedules pods even when the rule fails to meet requirements.