Asking for help? Comment out what you need so we can get more information to help you!
Kubernetes version:
Cloud being used: (put bare-metal if not on a public cloud)
Installation method: kubeadm
Host OS: Ubuntu 22.04 LTS
CNI and version: NA
CRI and version:
Docker Engine - Community Version: 24.0.7
containerd: Version: 1.6.27
I have Installed docker, cri-dockerd and kubelet kubeadm kubectl
started initiating the cluster with the below cmd
kubeadm init --pod-network-cidr 10.244.0.0/16 --apiserver-advertise-address=HOSTIP --cri-socket=unix:///var/run/cri-dockerd.sock
getting ERROR:
[init] Using Kubernetes version: v1.29.1
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR CRI]: container runtime is not running: output: time=“2024-01-19T09:11:55Z” level=fatal msg=“validate service connection: validate CRI v1 runtime API for endpoint "unix:///var/run/cri-dockerd.sock": rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial unix /var/run/cri-dockerd.sock: connect: connection refused"”
, error: exit status 1
[preflight] If you know what you are doing, you can make a check non-fatal with
--ignore-preflight-errors=...
To see the stack trace of this error execute with --v=5 or higher
Docker and containerd daemons are running, but the kubelet is not running.
kubelet Error:
: E0118 10:11:36.691366 2383 run.go:74] “command failed” err="failed to load kubelet config file, path: /var/lib/kubelet/config.yaml, error: failed to l>
: kubelet.service: Main process exited, code=exited, status=1/FAILURE
: kubelet.service: Failed with result ‘exit-code’.
: kubelet.service: Scheduled restart job, restart counter is at 9
swap is deactivated,
file /var/lib/kubelet/config.yaml is available in the location with the right permissions.
You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.
From the errors you’ve provided, there are a couple of key issues that stand out:
CRI (Container Runtime Interface) Error
: The error message regarding the CRI indicates that
kubeadm init
is unable to communicate with the container runtime through the specified
cri-dockerd
socket. This could be due to
cri-dockerd
not running or not being properly configured to work with Kubernetes.
Kubelet Configuration Issue
: The error from the kubelet service suggests there’s a problem loading the kubelet config file. This might be due to incorrect configuration options within the file or issues with how the kubelet was set up or started.