Kubernetes 集群 troubleshooting

Kubernetes 集群 troubleshooting – 陈少文的网站 (chenshaowen.com)

1、FailedCreatePodSandBox

  • 错误

Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:402: getting the final child's pid from pipe caused: EOF: unknown

  • 处理

清理 cache:

echo 3 > /proc/sys/vm/drop_caches

原因:内存碎片过多。

2、calico-node 不停重启 increase max user

  • 错误

runtime: failed to create new OS thread (have 11 already; errno=11),runtime: may need to increase max user processes (ulimit -u)

  • 处理

增加 ulimit 限制额度

    ulimit -u unlimited

原因:用户进程耗尽。

3、calico-node BIRD is not ready

  • 错误

Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to connect to BIRDv4 socket: dial unix /var/run/calico/bird.ctl: connect: connection refused

  • 处理

执行 ifconfig 找到当前主机 IP 绑定的网卡,例如 ens192

kubectl -n kube-system edit ds calico-node

- name: IP_AUTODETECTION_METHOD
value: can-reach=$(NODEIP)

改为

- name: IP_AUTODETECTION_METHOD
value: "interface=ens192"

原因:没有正确识别到网卡

4、Pod 创建慢

  • 错误

    Sep 11 08:23:17 node3 kubelet[1437]: E0911 08:23:17.770706 1437 kubelet_volumes.go:225] "There were many similar errors. Turn up verbosity to see them." err="orphaned pod \"10ff3c51-ebf2-47dd-b837-fd584319a754\" found, but error not a directory occurred when trying to remove the volumes dir" numErrs=10

  • 原因
  • 可能的原因之一是,创建 Pod 依赖 Secret、ConfigMap 等资源,但在当前命名空间下,这些资源不存在,导致 Kubelet 一直尝试去获取这些资源,直到超时,影响了 Pod 的创建。

  • 处理
  • 找到缺失的资源,创建之。

posted @   beawh  阅读(253)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
历史上的今天:
2021-10-09 xshell ssh 登录慢
2020-10-09 10月份四季度
2019-10-09 ERROR2002 can not connect to lcoal Mysql Server throuth socket '/tmp/mysql.sock'
点击右上角即可分享
微信分享提示