nodeName or nodeSelector? - to deploy a pod on particular node

Hi!
If asked to deploy pod/pods on a particular node, should we use nodeName or nodeSelector(not considering the taints here)

Thank you in advance!!

Nodename should be fine.
If Taint then nodeSelector

1 Like

Hi,

Use nodeName to deploy to a specific node and nodeSelector to deploy across multiple nodes based on labels.

2 Likes

Hi,

using node name,kube API will aware of the node in which the pod has to deploy without waiting for scheduler information.

you can use nodeSelector,if your node has label.