I am on the lab -- troubleshoot controlplane failures, and I do not find the kub . . .

Karim Meslem:
perhaps part of the answer of that lab is that you have to create the kubelet yourself on the controlplane node. I don’t know

Mayur Sharma:
@Karim Meslem: no, the question was totally different and I could solve that.

Doubt got raised after I notice that all components on controlplane are installed are static pods.

So, someone has to installed it, who is it? I beleive kubeadm.
Then, how the static pod directory is configured and who looks it for auto scheduling if kubelet is not there.

Karim Meslem:
now I’m confused :wink: scheduling (decision) is done by the scheduler, not the kubelet.

Mayur Sharma:
static pods and daemon sets are not scheduled by scheduler :slightly_smiling_face:

Karim Meslem:
yeah, let me stick to what I know: kubelet and kube-proxy are worker node components and I wouldn’t expect them to be present on a contolplane node.

Mayur Sharma:
Sorry :stuck_out_tongue: , but kube-proxy should be available across all nodes for communication between services.

Karim Meslem:
yes, but as per the k8s docs, a node is a worker machine :stuck_out_tongue:

Mayur Sharma:
Yeah, right. let see if anyone can clear the doubt regarding,

  1. how static pods are deployed on master node, I think kubeadm does that but how, using which component, and
  2. where is the configuration on master node to set the static pod directory as /etc/kubernetes/manifest
    @Mumshad Mannambeth @Mohamed Ayman

Karim Meslem:
it’s all well documented in the official docs as you might expect.
<Create static Pods | Kubernetes static Pods | Kubernetes>

as for clusters created with kubeadm init, refer these docs for the static pod part, how and by whom
<https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-init/|kubeadm init | Kubernetes>

Fernando Jimenez:
@Mayur Sharma In that particular lab, the controlplane is a container, and not a full operating system and that’s the reason you can not see the kubelet. However, there is one working behind the scene. In this case, it is not necessary to have access to the kubelet binary.

Mayur Sharma:
@Fernando Jimenez Thanks for the insight, I got a doubt because in that lab we have to fix the scheduler command (kube-schedulerrrr to kube-scheduler).

I knew that static pods are present by default in /etc/kubernetes/manifests folder.
This is configured in kubelet config property/file, so thinking to confirm the property value before moving into the default directory.
But when I did not find kubelet, so asked the query here.
Thanks again for your answer!

unnivkn:
@Fernando Jimenez How you conclude it is a container and not an OS. Is there a way ?. where as worker node seems to be OS rt?

unnivkn:
@Fernando Jimenez just look at this chat & video Its leading to your assumption. https://kodekloud.slack.com/archives/CHMV3P9NV/p1621936204277100

Fernando Jimenez:
@unnivkn A simple ps auxw in the so called controlplane will show that it is a container.

unnivkn:
hmmm… interesting :+1:

SaidBen:
Kubelet is set up by KUBEADM on all modes the same way including the master node. If you don’t see it then something is wrong with the cluster set up. What happen when you run systemctl status kubelet? Did you you try sudo systemctl restart kubelet?

unnivkn:

unnivkn:
https://kubernetes.io/docs/concepts/overview/components/

unnivkn:

unnivkn: