containerd: [ERROR CRI]: container runtime is not running: output
Description
Hi, I have installed Docker version 20 and Kubernetes on ubuntu 22.4, when I try to do a Kubeadm init
I get
salam@kubernetes:~$ sudo kubeadm init
[init] Using Kubernetes version: v1.26.1
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR CRI]: container runtime is not running: output: time=“2023-02-20T08:33:48Z” level=fatal msg=“validate service connection: CRI v1 runtime API is not implemented for endpoint "unix:///var/run/containerd/containerd.sock": rpc error: code = Unimplemented desc = unknown service runtime.v1.RuntimeService”
, 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
I do sudo systemctl status containerd
it is up and running as follows
not sure what I should do or check Thanks for your help
Steps to reproduce the issue
- Install Docker version 20.10.12, build 20.10.12-0ubuntu4
- Install Kubernetes components through its rep Kubeam, kubelet,…
- run kubeadm init
Describe the results you received and expected
[init] Using Kubernetes version: v1.26.1
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR CRI]: container runtime is not running: output: time=“2023-02-20T08:40:14Z” level=fatal msg=“validate service connection: CRI v1 runtime API is not implemented for endpoint "unix:///var/run/containerd/containerd.sock": rpc error: code = Unimplemented desc = unknown service runtime.v1.RuntimeService”
, 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
What version of containerd are you using?
containerd github.com/containerd/containerd 1.5.9-0ubuntu3.1
Any other relevant information
crictl info
salam@kubernetes:~$ crictl info WARN[0000] runtime connect using default endpoints: [unix:///var/run/dockershim.sock unix:///run/containerd/containerd.sock unix:///run/crio/crio.sock unix:///var/run/cri-dockerd.sock]. As the default settings are now deprecated, you should set the endpoint instead. E0220 08:42:53.348417 2971 remote_runtime.go:616] “Status from runtime service failed” err=“rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix /var/run/dockershim.sock: connect: no such file or directory"” FATA[0000] getting status of runtime: rpc error: code = Unavailable desc = connection error: desc = “transport: Error while dialing dial unix /var/run/dockershim.sock: connect: no such file or directory”
Show configuration if it is related to CRI plugin.
cat: /etc/containerd/config.toml: No such file or directory
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 4
- Comments: 32 (4 by maintainers)
I had a same error while executing command
kubeadm init --pod-network-cidr=10.244.0.0/16
.Error :
I performed below steps :
Correct configuration is specified for the endpoint “unix:///var/run/containerd/containerd.sock” and enabled the plugin instead of disabled. Added below code in
/etc/containerd/config.toml
[plugins.“io.containerd.grpc.v1.cri”.containerd] endpoint = “unix:///var/run/containerd/containerd.sock”systemctl restart containerd
My
/etc/containerd/config.toml
file :This resolved my issue.
please go to /etc/containerd/config.toml change disabled_plugin to enabled_plugin
Fix the Error To fix the error you can delete the config.tomal file and restart containerd then try the init command like below:
$ rm /etc/containerd/config.toml $ systemctl restart containerd $ kubeadm init
https://k21academy.com/docker-kubernetes/container-runtime-is-not-running/
Note:100% it worked for me
I resolved my issue with the commands below:
Configure containerd
mkdir -p /etc/containerd containerd config default | tee /etc/containerd/config.toml sudo sed -i ‘s/SystemdCgroup = true/SystemdCgroup = false/g’ /etc/containerd/config.toml
Restart containerd
systemctl restart containerd
Hi all i tried to enable plugin in config.toml file and i was able to initialize kubeadm
I got it, you introduced the containerd by installing docker, so the cri plug-in will not be enabled, so crictl cannot be used normally, and secondly, the containerd
/etc/containerd/config.toml
used by docker should be like thisThen
systemctl restart containerd
You try to start a nginx using docker run to see if it can be used normally.you need to install containerd and then try to find this config file. Once found, edit and enable CRI plugin which is by default disabled_plugin. make it enabled_plugin.
After googling and updating several config files especailly with cgroup driver systemd, now I discovered that kubelet service is not starting
and here is the config file
1/root 2/version 3/cri I did but still getting the same error:

So there are a number of issues in this issue…
When trying to connect to containerd via the cri api:
apologies for any confusion, please reopen or comment if these resolutions do not fix you problem…
OK, I created manually the file
and pasted
running sudo crictl ps I get
rerun