Skip to main content
Solved

Kubernetes Question of the day July 19 2022


Geoff Burke
Forum|alt.badge.img+22

What is the easiest method to force a pod to run on a certain node?

Best answer by Aly Idriss

nodeselector 

View original
Did this topic help you find an answer to your question?

5 comments

JMeixner
Forum|alt.badge.img+17
  • On the path to Greatness
  • 2650 comments
  • July 19, 2022

I think the easiest way is to include a nodename field in your pod specification and assign the name of the desired node as value to this field.

There are other possible and more flexible ways to accomplish this, but I think they are more complicated.


  • New Here
  • 1 comment
  • July 19, 2022

If one needs to go flexible use nodeSelector, else use nodeName to be more rigid and run the pod on specific node


Aly Idriss
Forum|alt.badge.img+1
  • Comes here often
  • 27 comments
  • Answer
  • July 19, 2022

nodeselector 


Iams3le
Forum|alt.badge.img+11
  • Veeam Legend
  • 1395 comments
  • July 19, 2022

Via Affinity: I think with nodeSelector is the simplest way to constrain Pods to nodes with labels.


JMeixner
Forum|alt.badge.img+17
  • On the path to Greatness
  • 2650 comments
  • July 19, 2022

Mhh, my limited understanding of this is, that you have to define a node label and a nodeselector for your solution.
The other procedure needs a nodename field only. A name has the node anyway.

But, as I said, I have a limited understanding and knowledge with this topic.


Comment