首页 新闻 会员 周边

Kubernetes 集群安装 cilium 后 coredns pod 无法启动

0
悬赏园豆:20 [已解决问题] 解决于 2026-10-06 21:13

昨天在阿里云国内云服务器上用 kubernetes 1.37.1 搭建集群,网络插件用的是 cilium,通过下面的命令安装

cilium install --version 1.20.1 \
  --set ipam.mode=kubernetes \
  --namespace kube-system \
  --set bpf.masquerade=true \
  --set kubeProxyReplacement=true

安装后 cilium 正常运行,但 coredns pod 因健康检查失败无法启动

  spec.containers{coredns}: Liveness probe failed: Get "http://192.168.0.13:8080/health": dial tcp 192.168.0.13:8080: connect: connection refused
  spec.containers{coredns}: Readiness probe failed: Get "http://192.168.0.13:8181/ready": dial tcp 192.168.0.13:8181: connect: connection refused
  spec.containers{coredns}: Container image "registry-vpc.cn-hangzhou.aliyuncs.com/cnblogs-k8s/coredns:v1.14.6" already present on machine and can be accessed by the pod
  spec.containers{coredns}: Container created
  spec.containers{coredns}: Container coredns failed liveness probe, will be restarted
  spec.containers{coredns}: Container started

请问如何解决这个问题?

问题补充:

操作系统用的是 ubuntu 26.04

dudu的主页 dudu | 高人七级 | 园豆:22569
提问于:2026-10-06 10:53
< >
分享
最佳答案
0

终于解决了,竟然是 coredns 镜像的问题!

用的是 coredns:v1.14.6 镜像,通过 docker push 推送到私有镜像仓库,部署时从私有镜像仓库拉取。

后来改为用 nerdctl push 重新推送镜像,问题就解决了。

dudu | 高人七级 |园豆:22569 | 2026-10-06 21:13
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册。