0 votes
in Kubernetes K8s by
Is it possible to force the pod to run on a specific node?

1 Answer

0 votes
by

By default, anti-affinity is not attempted by Kubernetes as its not a hard requirement,If its enforced, will schedule multiple pods on the same node

Pod can be constrained to only be able to run on particular nodes or to prefer to run on particular nodes. Several ways to achieve this, and all use label selectors to make the selection. Such constraints make scheduler to automatically do a reasonable placement, but in some circumstances we need more control on a node where a pod lands, 

from two different services that communicate a lot into the same availability zone.

There are several ways to do this, and they all use label selectors to make the selection. 

Generally such constraints are unnecessary, as the scheduler will automatically do a reasonable placement

...