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

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

相关推荐
元气满满的热码式4 小时前
K8S中Service详解(一)
云原生·容器·kubernetes
元气满满的热码式8 小时前
K8S中ingress详解
云原生·容器·kubernetes
jcrose25809 小时前
Ubuntu二进制部署K8S 1.29.2
linux·ubuntu·kubernetes
matrixlzp9 小时前
K8S 启动探测、就绪探测、存活探测
云原生·容器·kubernetes
Dusk_橙子9 小时前
在K8S中,如何使用EFK实现日志的统一管理?
云原生·容器·kubernetes
Tony11549 小时前
Kubernetes v1.28.0安装dashboard v2.6.1(k8s图形化操作界面)
云原生·容器·kubernetes
龙胖不下锅9 小时前
k8s资源预留
云原生·容器·kubernetes
超级阿飞9 小时前
利用Kubespray安装生产环境的k8s集群-排错篇
docker·容器·kubernetes
喝醉酒的小白9 小时前
在 Kubernetes 上快速安装 KubeSphere v4.1.2
云原生·容器·kubernetes
progrmmmm9 小时前
k8s使用nfs持久卷
linux·服务器·kubernetes·k8s·运维开发