Kubelet service is not starting

kubelet service is not starting after installation.

Log:

Dec 30 13:00:05 target kubelet[7131]: E1230 10:00:05.893781    7131 server.go:205] "Failed to load kubelet config file" err="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" path="/var/lib/kubelet/config.yaml"
Dec 30 13:00:05 target systemd[1]: kubelet.service: Main process exited, code=exited, status=1/FAILURE
Dec 30 13:00:05 target systemd[1]: kubelet.service: Failed with result 'exit-code'.

Status:

ubuntu@target:~$ sudo systemctl status kubelet.service
â—Ź kubelet.service - kubelet: The Kubernetes Node Agent
     Loaded: loaded (/lib/systemd/system/kubelet.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/kubelet.service.d
             └─10-kubeadm.conf
     Active: activating (auto-restart) (Result: exit-code) since Thu 2021-12-30 10:04:01 -03; 8s ago
       Docs: https://kubernetes.io/docs/home/
    Process: 7639 ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS (code=exited>
   Main PID: 7639 (code=exited, status=1/FAILURE)

Kubeadm: 1.23.1-00
Kubelet: 1.23.1-00
Kubectl: 1.23.1-00
Docker: 20.10.12
Installation Method: kubeadm
Cloud being used: bare-metal
OS: Ubuntu 20.04.3
Kernel: 5.4.0-91-generic
Network: Weaveworks 2.8.1

1 Like

Hello,
I’m having the same problem… notice you haven’t got an answer yet. I hope no one thinks our question is too basic to answer… how else do you get started with this stuff?

Could you check that the file:

/var/lib/kubelet/config.yaml

Exists on the node and if it does paste it here?

any update !

sudo cat /var/lib/kubelet/config.yaml
apiVersion: kubelet.config.k8s.io/v1beta1
authentication:
  anonymous:
    enabled: false
  webhook:
    cacheTTL: 0s
    enabled: true
  x509:
    clientCAFile: /etc/kubernetes/pki/ca.crt
authorization:
  mode: Webhook
  webhook:
    cacheAuthorizedTTL: 0s
    cacheUnauthorizedTTL: 0s
cgroupDriver: systemd
clusterDNS:
- 172.16.0.10
clusterDomain: cluster.local
cpuManagerReconcilePeriod: 0s
evictionPressureTransitionPeriod: 0s
fileCheckFrequency: 0s
healthzBindAddress: 127.0.0.1
healthzPort: 10248
httpCheckFrequency: 0s
imageMinimumGCAge: 0s
kind: KubeletConfiguration
logging:
  flushFrequency: 0
  options:
    json:
      infoBufferSize: "0"
  verbosity: 0
memorySwap: {}
nodeStatusReportFrequency: 0s
nodeStatusUpdateFrequency: 0s
resolvConf: /run/systemd/resolve/resolv.conf
rotateCertificates: true
runtimeRequestTimeout: 0s
shutdownGracePeriod: 0s
shutdownGracePeriodCriticalPods: 0s
staticPodPath: /etc/kubernetes/manifests
streamingConnectionIdleTimeout: 0s
syncFrequency: 0s
volumeStatsAggPeriod: 0s

did you try with these commands?
# systemctl start kubelet.service

# systemctl enable kubelet.service