Why kubelet is running on kubernetes master node?

10/21/2019

I have deployed a kubernetes cluster (1 master and 2 worker)on my local laptop using kubeadm.

Noted that the kubelet is running on master node as well. From the articles i have read earlier, kubelet is only needed on worker nodes. Can someone let me know why the kubernetes master node has kubelet service running?

-- Lijo
kubernetes
kubernetes-pod

2 Answers

10/21/2019

Kubelet is Kubernetes agent for managing Pods. There are some Pods running on your Master nodes, too. For example, your network Pods, your etcd Pods (if you haven't provided its cluster yourself), and any other Pods that you run on your Master nodes (a node exporter, log collector, etc.) or any DaemonSet that you didn't tolerate them not to get scheduled on your Master nodes are kinds of Pods that run on your Master. So Kubernetes needs Kubelet to manage them.

-- Ali Tou
Source: StackOverflow

10/21/2019

The reason is that kubeadm uses containers (pods) to deploy etcd and the api server components. For this static manifests are created as yaml-files which are picked up by the kubelet on the master node to provide the infrastructure pods.

An added benefit is that you have the master node metrics available from the kubernetes api.

-- Thomas
Source: StackOverflow