Is it possible to force the pod to run on a specific node?

0 votes
Can i put a constraint on a pod to run on a particular node only?
Jul 15, 2019 in Kubernetes by Sahil
98 views

1 answer to this question.

0 votes

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. 

There are 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.

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

answered Jul 15, 2019 by Sirajul
• 50,440 points

Related Questions In Kubernetes

0 votes
1 answer

Is it possible to access GCP resources using api without a user interaction.?

yes that's totally possible. You'd have to create ...READ MORE

answered Sep 19, 2018 in Kubernetes by Kalgi
• 51,830 points
58 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
5,583 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 11, 2019 in Kubernetes by Kalgi
• 51,830 points

reshown Apr 12, 2019 by Kalgi 1,523 views
0 votes
2 answers

How do I force a pod to run on a specific node?

By default, anti-affinity is not attempted by Kubernetes as ...READ MORE

answered Aug 6, 2019 in Kubernetes by Sirajul
• 50,440 points
183 views
0 votes
1 answer

Is it possible for containers within a pod to communicate with each other?

Yes, it is possible for containers to ...READ MORE

answered Jul 12, 2019 in Kubernetes by Sirajul
• 50,440 points
492 views