If scheduler is not present in kube-system so after adding nodeName in yaml file, will the scheduler show up in kube-system?
Hi @Sidd no I dont think so … infact pod will be auto scheduled on the desired node without scheduler.
So, there are 2 cases
If there is no scheduler present in kube-system and you want to auto schedule your pods then your pods will go into pending state
If there is no scheduler present in kube-system and you want to manually schedule a pod with the help of
nodeName attribute, yes pod will get assigned to the corresponding node.
Hope that makes sense
@Ashok Kumar Case-2: now will the scheduler show up in
kubectl get pods -n kube-system
Because in practice Q was to check why pod was in pending state and solutin was no scheduler present in kube-system. Hence had to manually create a a scheduler now shouldn’t this show in kube-system
Let me help you understand more clear, so if you do not have scheduler which is
default-scheduler then 100% you will not be able to schedule pods even though you have given
nodeName on the manifest because someone has to do the scheduling right? And there is no scheduler present on the entire cluster to do the job and that’s why your pod enters into pending state.
For your advanced learning:
If you have your own scheduler on any namespace then it should be explicitly specified on the pod manifest
And to create one checkout https://kubernetes.io/docs/tasks/extend-kubernetes/configure-multiple-schedulers/|here
On case-2 I meant if no default-scheduler on kube-system then you can assign the pods with your own scheduler and place it on the required node
Thanks, I need to study more about scheduler.