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

0 votes
How do I force a Kubernetes pod to run on a specific node? Is it possible? As far as I remember, it's not.
Jul 25 in Kubernetes by Haseeb
37 views

2 answers to this question.

0 votes
answered Jul 25 by Jasmine
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 Aug 6 by Sirajul
• 31,740 points

Related Questions In Kubernetes

0 votes
1 answer

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

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

answered Jul 15 in Kubernetes by Sirajul
• 31,740 points
45 views
0 votes
1 answer

How do i tie a service to a pod or a set of pods?

By declaring pods with the label(s) and ...READ MORE

answered Jul 16 in Kubernetes by Sirajul
• 31,740 points
35 views
0 votes
1 answer
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,658 views
+3 votes
1 answer
0 votes
1 answer

How do I run kubernetes on AWS

There are two main ways to use ...READ MORE

answered Oct 26, 2018 in Kubernetes by Kalgi
• 41,820 points
62 views