I have three nodes and have pod replica 9. When I am trying to deploy, Pods are unevenly scheduled on nodes.
How can I make sure that Pods are evenly scheduled on three nodes?
I have three nodes and have pod replica 9. When I am trying to deploy, Pods are unevenly scheduled on nodes.
How can I make sure that Pods are evenly scheduled on three nodes?
You should configure topology spread constraints. These control how pods are scheduled across your Kubernetes cluster based on regions, zones, nodes.
For spreading across nodes, you could use maxSkew (maxSkew describes the degree to which Pods may be unevenly distributed)
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: node
whenUnsatisfiable: DoNotSchedule