20

I encountered as below when executing sudo kubeadm init Help me~~

$ sudo kubeadm init
[init] Using Kubernetes version: v1.24.1
[preflight] Running pre-flight checks
        [WARNING SystemVerification]: missing optional cgroups: blkio
error execution phase preflight: [preflight] Some fatal errors occurred:
        [ERROR CRI]: container runtime is not running: output: E0605 10:35:34.973561   12491 remote_runtime.go:925] "Status from runtime service failed" err="rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService"
time="2022-06-05T10:35:34+09:00" level=fatal msg="getting status of runtime: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.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
Jaehyun Lee
  • 247
  • 1
  • 2
  • 4

1 Answers1

63

work around found here : https://github.com/containerd/containerd/issues/4581

rm /etc/containerd/config.toml
systemctl restart containerd
kubeadm init
benj
  • 639
  • 2
  • 2
  • 4
    I don't know why you would remove the `config.toml` configuration. It clearly states in the issue that disabling the `cri` plugin via `disabled_plugins = ["cri"]` causes the issue. – Xanmashi Jun 16 '22 at 10:21
  • 1
    @Xanmashi At the moment, deleting and commenting out `disabled_plugins = ["cri"]` has the same effect, as this is the only uncommented line in the `config.toml` file. But you are right that deleting the file instead of just commenting out the line may cause unexpected errors during future updates. – BloodhunterD Jul 07 '22 at 13:11
  • 2
    I followed user@k8s-master:~/$ sudo rm /etc/containerd/config.toml user@k8s-master:~/$ sudo systemctl restart containerd user@k8s-master:~/$ sudo kubeadm init still facing the issue – subhashis Aug 24 '22 at 09:25
  • For more details https://github.com/containerd/containerd/issues/4581 – Suraj Singh Rathore Dec 14 '22 at 10:12
  • Even after commenting or deleting it is not working in my case for v1.26.1 – Abhishek Dutta Feb 01 '23 at 11:22
  • It says, [ERROR CRI]: container runtime is not running: output: time="2023-02-01T16:50:16+05:30" level=fatal msg="validate service connection: CRI v1 runtime API is not implemented for endpoint \"unix:///run/containerd/containerd.sock\": rpc error: code = Unimplemented desc = unknown service runtime.v1.RuntimeService" – Abhishek Dutta Feb 01 '23 at 11:23
  • Same as @AbhishekDutta, I have no idea what else to try... – Diego Bernal Feb 01 '23 at 11:24