当前位置: 首页 > news >正文

k8s初始化时候,报错无法通过 CRI(容器运行时接口)与 containerd 通信

报错主要信息处
[reset] Unmounting mounted directories in “/var/lib/kubelet”
W0513 11:34:19.818023 27124 cleanupnode.go:134] [reset] Failed to evaluate the “/var/lib/kubelet” directory. Skipping its unmount and cleanup: lstat /var/lib/kubelet: no such file or directory
W0513 11:34:19.837582 27124 cleanupnode.go:99] [reset] Failed to remove containers: output: time=“2025-05-13T11:34:19+08:00” level=fatal msg=“validate service connection: validate CRI v1 runtime API for endpoint “unix:///run/containerd/containerd.sock”: rpc error: code = Unimplemented desc = unknown service runtime.v1.RuntimeService”
, error: exit status 1
[reset] Deleting contents of directories: [/etc/kubernetes/manifests /etc/kubernetes/pki]
[reset] Deleting files: [/etc/kubernetes/admin.conf /etc/kubernetes/kubelet.conf /etc/kubernetes/bootstrap-kubelet.conf /etc/kubernetes/controller-manager.conf /etc/kubernetes/scheduler.conf]

The reset process does not clean CNI configuration. To do so, you must remove /etc/cni/net.d

The reset process does not reset or clean up iptables rules or IPVS tables.
If you wish to reset iptables, you must do so manually by using the “iptables” command.

If your cluster was setup to utilize IPVS, run ipvsadm --clear (or similar)
to reset your system’s IPVS tables.

The reset process does not clean your kubeconfig files and you must remove them manually.
Please, check the contents of the $HOME/.kube/config file.
11:34:19 CST message: [node1]
init kubernetes cluster failed: Failed to exec command: sudo -E /bin/bash -c “/usr/local/bin/kubeadm init --config=/etc/kubernetes/kubeadm-config.yaml --ignore-preflight-errors=FileExisting-crictl,ImagePull”
W0513 11:34:19.641213 27083 utils.go:69] The recommended value for “clusterDNS” in “KubeletConfiguration” is: [10.233.0.10]; the provided value is: [169.254.25.10]
[init] Using Kubernetes version: v1.26.0
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR CRI]: container runtime is not running: output: time=“2025-05-13T11:34:19+08:00” level=fatal msg=“validate service connection: validate CRI v1 runtime API for endpoint “unix:///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: Process exited with status 1
11:34:19 CST retry: [node1]

主要错误处:
[ERROR CRI]: container runtime is not running:
rpc error: code = Unimplemented desc = unknown service runtime.v1.RuntimeService

这说明 kubeadm 无法通过 CRI(容器运行时接口)与 containerd 通信,因为缺少了正确的服务实现,通常这是由于 containerd 的配置不兼容或者 containerd 安装得不完整。

首先确定containerd 配置正确启用了 CRI 插件,sudo cat /etc/containerd/config.toml | grep -A 5 “[plugins.“io.containerd.grpc.v1.cri”]”
在这里插入图片描述
查看不到没有

重新生成
sudo mv /etc/containerd/config.toml /etc/containerd/config.toml.bak
sudo containerd config default | sudo tee /etc/containerd/config.toml
在这里插入图片描述
重启
sudo systemctl restart containerd

查看验证
sudo ctr plugins ls | grep cri
在这里插入图片描述
在这里插入图片描述
再次初始化集群就可以了


文章转载自:
http://bitartrate.ciuzn.cn
http://caravel.ciuzn.cn
http://aluminum.ciuzn.cn
http://careerman.ciuzn.cn
http://ashtoreth.ciuzn.cn
http://catholic.ciuzn.cn
http://chagatai.ciuzn.cn
http://abandonment.ciuzn.cn
http://branchia.ciuzn.cn
http://aesir.ciuzn.cn
http://astrocyte.ciuzn.cn
http://astilbe.ciuzn.cn
http://chokey.ciuzn.cn
http://amygdaloidal.ciuzn.cn
http://auxin.ciuzn.cn
http://airways.ciuzn.cn
http://braise.ciuzn.cn
http://busload.ciuzn.cn
http://bobbysoxer.ciuzn.cn
http://boshbok.ciuzn.cn
http://carpus.ciuzn.cn
http://barbola.ciuzn.cn
http://antimonous.ciuzn.cn
http://aproposity.ciuzn.cn
http://cataplasia.ciuzn.cn
http://animatedly.ciuzn.cn
http://ballsy.ciuzn.cn
http://began.ciuzn.cn
http://basting.ciuzn.cn
http://alveolar.ciuzn.cn
http://www.dtcms.com/a/188072.html

相关文章:

  • 2025.05.10京东机考真题算法岗-第二题
  • 【数据结构】——栈和队列OJ
  • TCP核心机制
  • list基础用法
  • Docker疑难杂症解决指南
  • ThingsBoard3.9.1 MQTT Topic(4)
  • python常用算法总结(下)
  • 基于STM32、HAL库的TLV320AIC3101IRHBR音频接口芯片驱动程序设计
  • [250512] Node.js 24 发布:ClangCL 构建,升级 V8 引擎、集成 npm 11
  • webservice获取全国省份区县编码(拼音全拼+拼音简写)
  • linux 抓包工具tcpdump使用小记(使用时注意权限和系统资源)
  • OpenHarmony 开源鸿蒙南向开发——linux下使用make交叉编译第三方库——mqtt库
  • 时间序列预测建模的完整流程以及数据分析【学习记录】
  • 从零开始了解数据采集(二十七)——什么IIOT平台
  • 源码分析之Leaflet中GeoJSON模块
  • 信息学奥赛一本通 1535:【例 1】数列操作
  • 信奥赛-刷题笔记-队列篇-T2-P1540机器翻译和P2952Cow Line S
  • 品种亮相!贵州金桥药业筑牢市场竞争护城河
  • MATLAB语音情感识别神经网络方法
  • 从零开始:使用 Vue-ECharts 实现数据可视化图表功能
  • INT202 Complexity of Algroithms 算法的复杂度 Pt.7 NP-Completeness NP完全性
  • SwarmUI 基于.NET开发的开源AI图像生成WEB用户界面系统
  • 市政务服务技能竞赛流程策划方案
  • 【计算机视觉】OpenCV实战项目:基于Tesseract与OpenCV的字符识别系统深度解析
  • 第十七章:Llama Factory 深度剖析:易用性背后的微调框架设计
  • flutter Stream 有哪两种订阅模式。
  • 工作常用的git命令
  • Node.js中的洋葱模型
  • C++中的volatile有什么用?
  • PostgreSQL 恢复信息函数