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, 2019 in Kubernetes by Haseeb
5,030 views

2 answers to this question.

0 votes
answered Jul 25, 2019 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, 2019 by Sirajul
• 59,230 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, 2019 in Kubernetes by Sirajul
• 59,230 points
1,325 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, 2019 in Kubernetes by Sirajul
• 59,230 points
1,765 views
0 votes
0 answers

How to access the configmap created on a worker node, in the pod.yaml in Master?

1. Configmap is created on the node1. ...READ MORE

Apr 5, 2020 in Kubernetes by jayabmaguluri
• 140 points
1,006 views
+1 vote
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
15,477 views
0 votes
1 answer

permissions related to AWS ECR

if you add allowContainerRegistry: true, kops will add those permissions ...READ MORE

answered Oct 9, 2018 in Kubernetes by Kalgi
• 52,350 points
1,396 views
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
• 52,350 points
769 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP