kubernetes 1.12.2 failed to load Kubelet config file /var/lib/kubelet/config.yaml

11/13/2018

Environment:

  • Kubernetes 1.12.2
  • Docker 18.9.0
  • microk8s.kubectl

$ k get all

NAME                                          READY   STATUS             
RESTARTS   AGE
pod/mysql-0                                   1/1     Running            0          72s
pod/nginx-ingress-microk8s-controller-c2pgz   0/1     CrashLoopBackOff   129        22h
pod/web-0                                     1/1     Running            0          78s

NAME                    TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)    AGE
service/kubernetes      ClusterIP   10.152.183.1   <none>        443/TCP    70m
service/mysql-service   ClusterIP   None           <none>        3306/TCP   72s
service/nginx-service   ClusterIP   None           <none>        80/TCP     78s

NAME                                               DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
daemonset.apps/nginx-ingress-microk8s-controller   1         1         0       1            0           <none>          2d22h

NAME                     DESIRED   CURRENT   AGE
statefulset.apps/mysql   1         1         72s
statefulset.apps/web     1         1         78s

/var/log/syslog:

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

Error syncing pod f0ab0f74-e6f2-11e8-8410-482ae31e6a94 ("nginx-ingress-microk8s-controller-c2pgz_default(f0ab0f74-e6f2-11e8-8410-482ae31e6a94)"), skipping: failed to "StartContainer" for "nginx-ingress-microk8s" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=nginx-ingress-microk8s pod=nginx-ingress-microk8s-controller-c2pgz_default(f0ab0f74-e6f2-11e8-8410-482ae31e6a94)"

What is nginx-ingress-microk8s-controller-c2pgz? Who started it?

-- Kok How Teh
docker
kubelet
kubernetes

1 Answer

8/13/2019

As i have updated kubelet, I am not able to find /var/lib/kubelet/config.yaml

For that "systemctl status kubelet|journalctl -xe"

failed to load Kubelet config file /var/lib/kubelet/config.yaml

As per the below link, I have copied the config.yaml from other working worker nodes and its worked !!

https://github.com/kubernetes/kubernetes/issues/65863#issuecomment-403003592

-- amit23comp
Source: StackOverflow