This seems like it should be simple enough, but I haven't been able to find an answer.
We have three labeled nodes:
thalia0
thalia1
thalia2
and a Deployment spec, named mm-sa.
I would simply like to set number of replicas of mm-sa to 48 and have the scheduler assign 16 pods to each node.
The closest I could find to this, was here, but it looks like this is not yet avaialble: Node affinity for even spread of pods across multiple availability zones. I also found this, why-kubernetes-scheduler-ignores-nodeaffinity, but it says that "According to the documentation, nodeAffinity must exist for each node that can be used for a scheduled pod and the node having the biggest weight sum is chosen."
This seems like such a simple use-case, but I cannot figure out how to achieve it without using a naïve approach, as in defining 3-different Deployments named mm-sa1, ... mm-sa3 and using a nodeSelector to assign each accordingly. (NB: I am currently using a nodeSelector to assign 16-replicas of mm-sa on a single node).
replicas: 48and deploy it, without specifically trying to influence the placement? - David MazeimagePullPolicyset toNeverfor the Deployment spec (all required docker images are on the specific nodes), I assume the scheduler would only assign the pods to the nodes with the particular images. - horcle_buzz