Fixed pod count per node

5/29/2019

I need fixed pod count on each node and count should stay fixed in any case. Pod count will be different on each node. Should I create separate deployments for each node or somehow use taints?

-- Jonas
kubernetes

1 Answer

5/29/2019

Once you are done with defining taints on required node. Only pods that have tolerations for them will be deployed on that particular node. Now, its fairly easy to control the number of pods that you want to run for that deployment.

deployment can be scaled up and down using

kubectl scale deployment <my_deployment> --replicas=<number of desired pods>

So, effectively you will be controlling number of pods on particular node.

Note: As I already commented, this design will be introducing single point of failure in your system for example, no pod of type A will be running if its node type is down.

-- Prateek Jain
Source: StackOverflow