Can someone please review this. I am getting this error everytime and unable to find the missing point. Though deployment and pod are runnign good on master node
Hello, @Mayur Sharma
I checked the question and there is no information to use
Hi @Tej_Singh_Rana, thanks for the response.
Two things, please help me with following doubts,
- Question does not mention to use nodeSelector. So, why it is looking specifically for nodeSelector.
- Also, I read somewhere that we should avoid use of nodeSelector and use nodeAffinity in case of scheduling the pod on specific node.
Can you please highlight when to use when.
@Tej_Singh_Rana: I tried with nodeSelector and tolerations. and it worked. Let me know about the above queries only
Thanks once again
Hi @Tej_Singh_Rana May I ask for your help here also and clear the doubt. Thanks
Sorry for late, response…
> Also, I read somewhere that we should avoid use of nodeSelector and use nodeAffinity in case of scheduling the pod on specific node.
Yeah, it is. but it’s about time.
We have to perform a task within a couple of mins to manage the time. You already know the node Affinity template, how complex it is.
If in the question, they specifically talk about labels and give a description like schedule a pod with help of node labels then you can choose
nodeSelector. It’s up to you.
For the exam perspective, we don’t need to do extra things, which can create a problem in the exam and will consume a lot of time to troubleshoot.
> Question does not mention to use nodeSelector. So, why it is looking specifically for nodeSelector.
We can use
nodeName field, we don’t need tolerations if we use this.
nodeSelector , we also require tolerations that will consume more time.
@Tej_Singh_Rana Thanks for the response. I understand the point of saving the time.
but you confused me with last statement
> “We can use
nodeName field, we don’t need tolerations if we use this.”
nodeName will select the node, but if we have taints on the node then we should use tolerations . Please correct me if I am wrong.
Hello, @Mayur Sharma
If you add
nodeName field in the pod specs then we don’t need to add tolerations.
Thanks @Tej_Singh_Rana for the clarification.