Mayur Sharma:
how do you find the kubelet on master node
Mayur Sharma:
controlplane $ ps -ef | grep kubelet
root 620 12 0 11:40 pts/1 00:00:00 grep --color=auto kubelet
controlplane $
I got nothing
Karim Meslem:
ps -ef | grep kubelet?
Karim Meslem:
its not there in your controlplane node, but I might expect on the worker node to be there.
Karim Meslem:
I am not at that lab yet, so I was referring to your question of “where is the staic pod (manifests directory)” defined
Mayur Sharma:
On worker node kubelet is there, but I want to know for master node.
Rephrasing it here:
- how static pods are installed on master node then, I think kubeadm deos that but how, using which component, and
- where is the configuration to set the static pod directory as /etc/kubernetes/manifest
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 scheduling (decision) is done by the scheduler, not the kubelet.
Mayur Sharma:
static pods and daemon sets are not scheduled by scheduler
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 , but kube-proxy should be available across all nodes for communication between services.
Mayur Sharma:
Yeah, right. let see if anyone can clear the doubt regarding,
- how static pods are deployed on master node, I think kubeadm does that but how, using which component, and
- 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