Kubernetes how to limit the number of identical pitches on the node?

6/14/2018

Good afternoon Actually how to disable the start-up of 2 identical pods on the same node. there are 2 nodes. there is Deployment with 2 replicas when you turn off the 2nd node on the 1st run 2 of the same hearth of the deployment.

-- Сергей Лапшин
kubernetes

1 Answer

6/14/2018

See https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity. Configure podAntiAffinity with requiredDuringSchedulingIgnoredDuringExecution to prevent scheduling two copies of the same pod on the same node.

-- ewramner
Source: StackOverflow