Ravi Paragi:
Hi All, I had installed kubeadm yesterday. It was all working fine. After rebooting instances kubelet is not coming on master node. getting below errors Any thoughts what could be the reason ? . Dec 15 17:39:32 kubemaster systemd[1]: Started kubelet: The Kubernetes Node Agent.
Dec 15 17:39:32 kubemaster kubelet[12851]: F1215 17:39:32.267276 12851 server.go:198] failed to load Kubelet config file /var/lib/kubelet/config.yaml, error failed to read kubelet config file “/var/lib/kubelet/config.yaml”, error: open /var/lib/kubelet/config.yaml: no such file or directory
Dec 15 17:39:32 kubemaster kubelet[12851]: goroutine 1 [running]:
Dec 15 17:39:32 kubemaster kubelet[12851]: http://k8s.io/kubernetes/vendor/k8s.io/klog/v2.stacks(0xc000122001|k8s.io/kubernetes/vendor/k8s.io/klog/v2.stacks(0xc000122001, 0xc000136840, 0xfb, 0x14d)
Dec 15 17:39:32 kubemaster kubelet[12851]: /workspace/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/k8s.io/klog/v2/klog.go:1026 +0xb9
Tej_Singh_Rana:
$ ip a
Tej_Singh_Rana:
Share the o/p by cat command:
$ cat /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
Don’t share screenshot, just do copy/paste with triple backtick.
Ravi Paragi:
vagrant@kubemaster:~$ sudo cat /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
Note: This dropin only works with kubeadm and kubelet v1.11+
[Service]
Environment=“KUBELET_KUBECONFIG_ARGS=–bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf”
Environment=“KUBELET_CONFIG_ARGS=–config=/var/lib/kubelet/config.yaml”
This is a file that “kubeadm init” and “kubeadm join” generates at runtime, populating the KUBELET_KUBEADM_ARGS variable dynamically
EnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env
This is a file that the user can use for overrides of the kubelet args as a last resort. Preferably, the user should use
the .NodeRegistration.KubeletExtraArgs object in the configuration files instead. KUBELET_EXTRA_ARGS should be sourced from this file.
EnvironmentFile=-/etc/default/kubelet
ExecStart=
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS
Tej_Singh_Rana:
Do one thing,
$ free -m
$ systemctl daemon-reload
$ systemctl restart kubelet
Tej_Singh_Rana:
Have you disabled the swap?
Ravi Paragi:
vagrant@kubemaster:~$ sudo ufw status verbose
Status: inactive
vagrant@kubemaster:~$
Tej_Singh_Rana:
$ free -m
Tej_Singh_Rana:
controlplane $ free -m
total used free shared buff/cache available
Mem: 1992 768 84 1 1140 1074
Swap: 0 0 0
Ravi Paragi:
vagrant@kubemaster:~$ free -m
total used free shared buff/cache available
Mem: 1992 260 802 0 929 1593
Swap: 0 0 0
vagrant@kubemaster:~$
Tej_Singh_Rana:
Is it same for worker node in kubelet?
Ravi Paragi:
yeah, its same for worker node also.
Did anyone able to resolve this error. i am also seeing same issue on my newly created kubernetes cluster.