Hi guys, a quick question. I read kube-scheduler deploys pods. Then, what creat . . .

Jayaswaroop Balla:
Hi guys, a quick question.

I read kube-scheduler deploys pods. Then, what creates the pods? kube-apiserver?

Hasan Alsaedi:
in short “kubelet”

Jayaswaroop Balla:
Thank you @Hasan Alsaedi

Here is the confusion…

At first, scheduler checks for resource availability on nodes and deploys the pod on the node where there are less pods running.

Say for example, there are two nodes with 10 pods on Node1 and 9 pods on Node2. Here, Kubelet lies on nodes. If kubelet create a new pod on Node2, then the pod is already deployed. right?

What does scheduler do here?

As per my understanding, a pod is created by some other service on Master and Scheduler deploys on the node with more resources. Then, kubelet runs the pod with docker image we specify.

Please correct me if my understanding is wrong.

Hasan Alsaedi:
Scheduler doesn’t deploy pods, it just tell where the pod should be run on which node " just telling"

Hasan Alsaedi:
This is why you can bypass scheduler and still you can deploy pods with “nodeName” as well as “Daemonset” both don’t relay on scheduler.

Hasan Alsaedi:
you are assuming this “At first, scheduler checks for resource availability on nodes and deploys the pod on the node where there are less pods running.” half of it right the “check resources” but the 2nd half is not right.

Hasan Alsaedi:
check the topic “static pods” and also CKA lab when there is no scheduler running, but we still able to run pods by configuring “nodeName” in pod specs.

Hasan Alsaedi:
you can deploy many pods in a cluster without the need to scheduler ( manually managed using nodeName). but this example is not realistic.

Jayaswaroop Balla:
Thank you very much @Hasan Alsaedi for the detailed explanation. I’ll go and study the Static Pods. Thank you.

Hasan Alsaedi:
nice and short explanation here https://kubernetes.io/docs/concepts/workloads/pods/#static-pods