I have an OpenShift Cluster which is spanned between two physical separated datacenters for georedundancy. The nodes are labeled according to their location.
Now i'm searching for a way to configure the scheduler in such a way that if a pod is running with one replica (which is in one of the two datacenters), and an additional replica is started, the additional replica starts in the other datacenters? So that if the deployment is running with an even number of replicas, the replicas are evenly distributed between both datacenters?
I was searching in the pod/node affinity documentation as well as scheduler configuration, but i didn't find anything i need. Maybe i'm just googling wrong?
Any help is greatly appreciated.
If you have given a label to the nodes, for instance location, check the labels with the following command
Spread across datacenter
you can add the following content inside the
/etc/origin/master/scheduler.json
file