0
点赞
收藏
分享

微信扫一扫

kubeadm init 报错 ”unknown service runtime.v1alpha2.RuntimeService”


kubeadm初始化报错如下:

[root@ECS-k8s-master docker]# kubeadm init   --apiserver-advertise-address=192.168.2.2 --image-repository registry.aliyuncs.com/google_containers   --kubernetes-version v1.24.2   --service-cidr=10.140.0.0/16 --pod-network-cidr=10.240.0.0/16
[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: E0704 14:55:48.132984 5226 remote_runtime.go:925] "Status from runtime service failed" err="rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService"
time="2022-07-04T14:55:48+08: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

网上查询光说让删除

rm /etc/containerd/config.toml

但其实,删除完后要重启 containerd 服务,不然不生效

完整如下:

rm /etc/containerd/config.toml
systemctl restart containerd

然后再执行

kubeadm init   --apiserver-advertise-address=192.168.2.2 --image-repository registry.aliyuncs.com/google_containers   --kubernetes-version v1.24.2   --service-cidr=10.140.0.0/16 --pod-network-cidr=10.240.0.0/16

起码这个错误不会出现了,其他错误看之前配置了。

举报

相关推荐

0 条评论