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
1,362 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
• 59,230 points

Related Questions In Kubernetes

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,038 views
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
• 52,350 points
751 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,623 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,079 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
• 59,230 points
5,135 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
• 59,230 points
3,925 views
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