I think that if you create a service that matches the pods of the deployment, K8s will attempt to spread out the pods by default. Also, check out "pod anti-affinity" ( https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature ).
On Mon, Dec 4, 2017, 13:09 <mderos...@gmail.com> wrote: > Hi all! > > I would like to know if there is a way to force Kubernetes, during a > deploy, to use every node in the cluster. > The question is due some attempts that I have done where I noticed a > situation like this: > > - a cluster of 3 nodes > - I update a deployment with a command like: kubectl set image > deployment/deployment_name my_repo:v2.1.2 > - Kubernetes updates the cluster > > At the end I execute kubectl get pod and I notice that 2 pods have been > deployed in the same node. > So after the update, the cluster has this configuration: > > - one node with 2 pods > - one node with 1 pod > - one node without any pod (totally without any workload) > > > Thanks for any suggestion > > -- > You received this message because you are subscribed to the Google Groups > "Kubernetes user discussion and Q&A" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to kubernetes-users+unsubscr...@googlegroups.com. > To post to this group, send email to kubernetes-users@googlegroups.com. > Visit this group at https://groups.google.com/group/kubernetes-users. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscr...@googlegroups.com. To post to this group, send email to kubernetes-users@googlegroups.com. Visit this group at https://groups.google.com/group/kubernetes-users. For more options, visit https://groups.google.com/d/optout.