关于k8s的cilium网络插件踩坑记

ops/2024/10/29 22:47:53/

cilium状态为CrashLoopBackOff

coredns状态为Pending

使用的系统镜像为centos7.6 内核是3.***      然后用的工具来部署集群,开始以为是调度啥的,然后单节点试也出现CrashLoopBackOff、Pending等状态,更新内核在到5+  集群自己就好了

注意:使用cilium网络插件保证系统内核在5以上,自己网上找个内核更新教程

[root@k8s-vip ~]# uname -r        
5.4.278-1.el7.elrepo.x86_64               
#更新后

报错的关键字,方便大数据搜索

[root@k8s-vip ~]# kubectl get pods --namespace kube-system -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES cilium-kpr88 0/1 Init:CrashLoopBackOff 5 (2m34s ago) 5m40s 192.168.0.178 k8s-vip <none> <none> cilium-operator-86666d88cb-gg5k9 1/1 Running 0 5m40s 192.168.0.178 k8s-vip <none> <none> coredns-5d78c9869d-f8hvw 0/1 Pending 0 5m40s <none> <none> <none> <none> coredns-5d78c9869d-j4l65 0/1 Pending 0 5m40s <none> <none> <none> <none> etcd-k8s-vip 1/1 Running 0 5m57s 192.168.0.178 k8s-vip <none> <none> kube-apiserver-k8s-vip 1/1 Running 0 5m57s 192.168.0.178 k8s-vip <none> <none> kube-controller-manager-k8s-vip 1/1 Running 0 5m55s 192.168.0.178 k8s-vip <none> <none> kube-proxy-zkpbq 1/1 Running 0 5m40s 192.168.0.178 k8s-vip <none> <none> kube-scheduler-k8s-vip 1/1 Running 0 5m57s 192.168.0.178 k8s-vip <none> <none> 

[root@k8s-master1 ~]# kubectl get pods -n kube-system NAME READY STATUS RESTARTS AGE cilium-4k62x 0/1 Init:CrashLoopBackOff 8 (4m2s ago) 20m cilium-6jxqk 0/1 Init:CrashLoopBackOff 8 (3m50s ago) 20m cilium-8lfxw 0/1 Init:CrashLoopBackOff 12 (90s ago) 20m cilium-hfssf 0/1 Init:CrashLoopBackOff 8 (3m47s ago) 20m cilium-operator-86666d88cb-nfww9 1/1 Running 0 20m cilium-z6xrg 0/1 Init:CrashLoopBackOff 8 (3m58s ago) 20m coredns-5d78c9869d-22ws4 0/1 Pending 0 21m coredns-5d78c9869d-gz5qq 0/1 Pending 0 21m etcd-k8s-master1 1/1 Running 0 21m etcd-k8s-master2 1/1 Running 0 20m etcd-k8s-master3 1/1 Running 0 20m kube-apiserver-k8s-master1 1/1 Running 0 21m kube-apiserver-k8s-master2 1/1 Running 0 21m kube-apiserver-k8s-master3 1/1 Running 0 20m kube-controller-manager-k8s-master1 1/1 Running 1 (20m ago) 21m kube-controller-manager-k8s-master2 1/1 Running 0 20m kube-controller-manager-k8s-master3 1/1 Running 0 20m kube-proxy-cnh8n 1/1 Running 0 20m kube-proxy-pbchh 1/1 Running 0 20m kube-proxy-qlknc 1/1 Running 0 21m kube-proxy-vfzrx 1/1 Running 0 21m kube-proxy-zqgt2 1/1 Running 0 20m kube-scheduler-k8s-master1 1/1 Running 1 (20m ago) 21m kube-scheduler-k8s-master2 1/1 Running 0 20m kube-scheduler-k8s-master3 1/1 Running 0 20m kube-sealos-lvscare-k8s-node1 1/1 Running 0 19m kube-sealos-lvscare-k8s-node2 1/1 Running 0 19m

#这条是查看cilium的容器详情发现的

Warning BackOff 94s (x94 over 21m) kubelet Back-off restarting failed container mount-cgroup in pod cilium-4k62x_kube-system(b9d7e309-b664-436c-adc0-c65cb64fdd42)

#这条是实时查询cgroup的

[root@k8s-master1 ~]# ls /proc/1/ns/cgroup ls: cannot access /proc/1/ns/cgroup: No such file or directory Oct 25 11:46:30 k8s-master1 kubelet[16627]: E1025 11:46:30.252517 16627 pod_workers.go:1294] "Error syncing pod, skipping" err="failed to \"StartContainer\" for \"mount-cgroup\" with CrashLoopBackOff: \"back-off 5m0s restarting failed container=mount-cgroup pod=cilium-8lfxw Oct 25 11:46:32 k8s-master1 kubelet[16627]: E1025 11:46:32.516907 16627 kubelet.go:2760] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized" Oct 25 11:46:37 k8s-master1 kubelet[16627]: E1025 11:46:37.517899 16627 kubelet.go:2760] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized" Oct 25 11:46:42 k8s-master1 kubelet[16627]: E1025 11:46:42.519728 16627 kubelet.go:2760] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"

#这条是containerd的日志信息

Oct 25 14:07:09 k8s-vip containerd[6837]: time="2024-10-25T14:07:09.312759255+08:00" level=warning msg="get container info failed" error="container \"32c367f459cb167292b12ef2c284c17786cca556cd054616b84220bda8583238\" in namespace \"k8s.io\": not found" Oct 25 14:09:58 k8s-vip containerd[6837]: time="2024-10-25T14:09:58.172299056+08:00" level=warning msg="cleaning up after shim disconnected" id=529aad484d8c2d9fd2fc45722f9c3bf50fce38edd5fc32f03a5e8d14879d2664 namespace=k8s.io Oct 25 14:09:58 k8s-vip containerd[6837]: time="2024-10-25T14:09:58.703783378+08:00" level=warning msg="get container info failed" error="container \"0e16c9a5f3dd2faa57d3c7e6e0e1627e26a8aadbbaf24e1f6d196996e6383513\" in namespace \"k8s.io\": not found" Oct 25 14:14:59 k8s-vip containerd[6837]: time="2024-10-25T14:14:59.143294777+08:00" level=warning msg="cleaning up after shim disconnected" id=993eb93eb74b8fcbc31746f4e45f960c5c1cd1a19f47fff65b69c3b062d138f3 namespace=k8s.io Oct 25 14:14:59 k8s-vip containerd[6837]: time="2024-10-25T14:14:59.378391295+08:00" level=error msg="RemoveContainer for \"529aad484d8c2d9fd2fc45722f9c3bf50fce38edd5fc32f03a5e8d14879d2664\" failed" error="failed to set removing state for container \"529aad484d8c2d9fd2fc45722f9c3bf50fce38edd5fc32f03a5e8d14879d2664\": container is already in removing state"

#这是容器接口cni,但原因还是cilium网络

Oct 25 14:16:16 k8s-vip containerd[15865]: time="2024-10-25T14:16:16.946120681+08:00" level=error msg="failed to load cni during init, please check CRI plugin status before setting up network for pods" error="cni config load failed: no network config found in /etc/cni/net.d: cni plugin not initialized: failed to load cni config"


http://www.ppmy.cn/ops/129426.html

相关文章

基于ESP32的RGB便携式视频灯

基于ESP32的RGB便携式视频灯 拥有一套能够满足个人需求的灯光设备至关重要。市面上的RGB视频灯虽然功能强大&#xff0c;但往往价格不菲。我制作的这款灯是20W RGB便携式视频灯不仅满足了我的需求&#xff0c;而且成本仅为市售产品的三分之一。接下来&#xff0c;我将详细介绍这…

基于SSM儿童众筹救助系统设计与实现

前言 儿童众筹救助系统的目的是让使用者可以更方便的将人、设备和场景更立体的连接在一起。能让用户以更科幻的方式使用产品&#xff0c;体验高科技时代带给人们的方便&#xff0c;同时也能让用户体会到与以往常规产品不同的体验风格。 此系统设计主要采用的是JAVA语言来进行开…

微信小程序 - 图像加载时渐隐淡入效果 image,实现渐入渐出动画效果,微信小程序实现图片加载淡入淡出效果,图像加载时的渐隐淡入效果!

前言 由于微信小程序图片组件加载成功后,会突然显示出来比较生硬,所以需要对其进行动画修饰。 在微信小程序开发中,实现图片加载时淡隐淡出效果,避免图片加载时显示的生硬效果。 小程序 vue2 | vue3 版本语法都能使用,跟着教程复制代码运行即可。 如下图所示,每次页面加…

.Net 8 Web API CRUD 操作

本次介绍分为3篇文章&#xff1a; 1&#xff1a;.Net 8 Web API CRUD 操作https://blog.csdn.net/hefeng_aspnet/article/details/143228383 2&#xff1a;在 .Net 8 API 中实现 Entity Framework 的 Code First 方法https://blog.csdn.net/hefeng_aspnet/article/details/1…

使用pytest单元测试框架执行单元测试

Pytest 是一个功能强大且灵活的 Python 单元测试框架&#xff0c;它使编写、组织和运行测试变得更加简单。以下是 Pytest 的一些主要特点和优点&#xff1a; 简单易用&#xff1a;Pytest 提供了简洁而直观的语法&#xff0c;使编写测试用例变得非常容易。它支持使用 assert 语…

【无人机设计与控制】基于Astar算法无人机路径规划,优化路径平滑

摘要 本文提出了一种基于A算法的无人机路径规划方法&#xff0c;并通过路径平滑优化提升路径的可行性和安全性。传统A算法在生成路径时&#xff0c;常因路径节点分布不规则导致路径不平滑&#xff0c;影响无人机的飞行效率和安全性。本文通过引入贝塞尔曲线对A*算法生成的路径…

JavaWeb合集16-JWT令牌验证

十六、JWT令牌验证 JWT&#xff08;JSON Web Token&#xff09;是一种用于在网络上安全传输信息的紧凑、URL 安全的表示形式。它是一种无状态的身份验证机制&#xff0c;常用于现代Web应用和服务之间传递用户身份信息或授权数据。JWT 设计用于在各方之间安全地传输信息&#x…

安全见闻8-9

声明 学习视频来自B站UP主泷羽sec,如涉及侵权马上删除文章 笔记的只是方便各位师傅学习知识,以下网站只涉及学习内容,其他的都与本人无关,切莫逾越法律红线,否则后果自负 安全见闻8&#xff1a;量子计算 一&#xff0c;量子计算原理概述&#xff1a; 量子概念的产生&#xf…