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 in Kubernetes by Sahil
43 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 by Sirajul
• 30,140 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
• 41,590 points
41 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 in Others by anonymous
2,569 views
+3 votes
1 answer
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 in Kubernetes by Sirajul
• 30,140 points
35 views
0 votes
1 answer