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

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

相关推荐
Python私教1 小时前
ubuntu搭建k8s环境详细教程
linux·ubuntu·kubernetes
O&REO2 小时前
单机部署kubernetes环境下Overleaf-基于MicroK8s的Overleaf应用部署指南
云原生·容器·kubernetes
politeboy2 小时前
k8s启动springboot容器的时候,显示找不到application.yml文件
java·spring boot·kubernetes
运维小文3 小时前
K8S资源限制之LimitRange
云原生·容器·kubernetes·k8s资源限制
登云时刻3 小时前
Kubernetes集群外连接redis集群和使用redis-shake工具迁移数据(二)
redis·容器·kubernetes
wuxingge12 小时前
k8s1.30.0高可用集群部署
云原生·容器·kubernetes
志凌海纳SmartX13 小时前
趋势洞察|AI 能否带动裸金属 K8s 强势崛起?
云原生·容器·kubernetes
锅总13 小时前
nacos与k8s service健康检查详解
云原生·容器·kubernetes
BUG弄潮儿13 小时前
k8s 集群安装
云原生·容器·kubernetes
颜淡慕潇15 小时前
【K8S系列】kubectl describe pod显示ImagePullBackOff,如何进一步排查?
后端·云原生·容器·kubernetes