How would you disable kubelet "at all"? I mean, I install my k8s
master with "kubeadm init", I dont install and run "systemctl kubelet
start", yet, my node is still registering and remain as "Not Ready"
node, so the registering part is still here.
If you've set up your kubernetes cluster using kubeadm, it is required to install kubelets on all nodes, including master as it deploys vast majority of key cluster components such as kube-apiserver
, kube-controller-manager
or kube-scheduler
as Pods
in kube-system
namespace (you can list them by kubectl get pods -n kube-system
). In other words: you cannot run your cluster with kubeadm
without having running kubelet
on your master node. Without it no system Pods
forming your kubernetes cluster can be deployed. See also this section in official kubernetes documentation.
As to Self-hosting the Kubernetes control plane mentioned by @Ivan, better read it carefully in official docs to understand how it really works:
kubeadm allows you to experimentally create a self-hosted Kubernetes
control plane. This means that key components such as the API server,
controller manager, and scheduler run as DaemonSet pods configured via
the Kubernetes API instead of static pods configured in the kubelet
via static files.
It's not written anywhere that you don't need kubelet
on master-node
at present. On the contrary, it says that in case of using self-hosted Kubernetes control plane (currently experimenta) approach in kubeadm
:
key components such as the API server
, controller manager
, and scheduler
run as DaemonSet
Pods
configured via the Kubernetes
API instead of static Pods
configured in the kubelet via static
files.
So again: in both approaches key cluster components are run as Pods
, only DaemonSets
are configured via Kubernetes API, but these are still Pods
and yes, static Pods
configured via static files (which is current kubeadm
approach) still need kubelet that can read those static files on master node and create appropriate Pods
declared in them.