I've got 4 nodes with label role=nginx
master ~ # kubectl get node
NAME LABELS STATUS
10.1.141.34 kubernetes.io/hostname=10.1.141.34,role=nginx Ready
10.1.141.40 kubernetes.io/hostname=10.1.141.40,role=nginx Ready
10.1.141.42 kubernetes.io/hostname=10.1.141.42,role=nginx Ready
10.1.141.43 kubernetes.io/hostname=10.1.141.43,role=nginx Ready
I have configured the selector to look for role=nginx
spec:
replicas: 4
selector:
role: nginx
But when I deploy the controller it deploys 2 pods on 2 different hosts. I want it to deploy one pod each on each of the nodes? Please Help!