Skip to content

Instantly share code, notes, and snippets.

@kudamhazo
Last active May 31, 2022 03:26
Show Gist options
  • Save kudamhazo/2d14d8c14d3b9a3e6247f31bf2faba14 to your computer and use it in GitHub Desktop.
Save kudamhazo/2d14d8c14d3b9a3e6247f31bf2faba14 to your computer and use it in GitHub Desktop.
Initialize kubelet service just after installation to fix service startup error.

If you are experiencing error with the kubelet service not running because of failed to load kubelet config file, error: failed to load Kubelet config file /var/lib/kubelet/config.yaml error.

# kubeadm-config.yaml
kind: ClusterConfiguration
apiVersion: kubeadm.k8s.io/v1beta3
kubernetesVersion: v1.24.1
---
kind: KubeletConfiguration
apiVersion: kubelet.config.k8s.io/v1beta1
cgroupDriver: systemd

Initialize with the config above using:

kubeadm init --config kubeadm-config.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment