In the networking demo, after applying the ping-deploy.yml the 3 pods have been deployed into the same node.
In the video in 1:40 it says: ‘that should HOPEFULLY get us one pod on each node’. Is there no way to force one pod on each node?
Am I missing something or do I just have not enough ‘hope’?
They were on three different nodes.
It’s a bit hard to see because the output wraps onto the next line, but notice the last four characters of the node name: "…-51xw", "…-xjfh" and "…-0hf2".
You could wrap the Pods in a DaemonSet or even maybe use Pod Anti-Affinity to avoid scheduling two pods with the same label on the same node.
The K8S scheduler will try to schedule like pods across nodes but, barring some directive like an affinity setting, it will take "best location" based on resources over spreading like pods across nodes. Even ReplicaSets can have multiple pods on one node if that is the optimum scheduling. You can use affinity and such to override the scheduling, but that is a Kubernetes anti-pattern. It’s best to let the scheduler do its job.