kubadm init: [ERROR CRI]: container runtime is not running
Quote from moshe on 27/06/2022, 12:02 amProblem
User trying to run kubadm init on master or nodes to initialize the cluster and gets the following error :
#kubeadm init
[init] Using Kubernetes version: v1.24.2
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR CRI]: container runtime is not running: output: time=”2022-06-26T19:02:43+03:00″ level=fatal msg=”unable to determine runtime API version: rpc error: code = Unavailable desc = connection error: desc = \”transport: Error while dialing dial unix /var/run/containerd/containerd.sock: connect: no such file or directory\””
, error: exit status 1
Solution1
sudo rm /etc/containerd/config.toml
sudo systemctl restart containerd
sudo kubeadm initSolution 2
systemctl restart docker
Problem
User trying to run kubadm init on master or nodes to initialize the cluster and gets the following error :
#kubeadm init
[init] Using Kubernetes version: v1.24.2
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR CRI]: container runtime is not running: output: time=”2022-06-26T19:02:43+03:00″ level=fatal msg=”unable to determine runtime API version: rpc error: code = Unavailable desc = connection error: desc = \”transport: Error while dialing dial unix /var/run/containerd/containerd.sock: connect: no such file or directory\””
, error: exit status 1
Solution1
sudo rm /etc/containerd/config.toml
sudo systemctl restart containerd
sudo kubeadm init
Solution 2
systemctl restart docker