惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
IT之家
IT之家
博客园_首页
Hugging Face - Blog
Hugging Face - Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
美团技术团队
小众软件
小众软件
博客园 - 叶小钗
WordPress大学
WordPress大学
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 三生石上(FineUI控件)
罗磊的独立博客
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
有赞技术团队
有赞技术团队
T
Tailwind CSS Blog
宝玉的分享
宝玉的分享
博客园 - 【当耐特】
月光博客
月光博客
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理

小松鼠的博客

记录一次线上k8s工作节点无法创建容器的问题排查思路与解决办法 记一次线上GoLang项目OOM排查过程 从LastPass转向拥抱开源KeePass的心路历程 故障定位与 AI 结合前后端编码实践 FileBeat收集nginx-ingress-controller日志 K8s云原生环境下文件描述符占用过高查询思路 2024年最新关闭火绒安全工具的开机自启方法 Kubernetes任务调度实践-Go语言实现Job和CronJob对比分析 离线更新k8s环境下的trivy漏洞库方法 使用Go语言接入Choerodon实现基于OAuth2的统一身份认证登录 在Vue2中自定义Switch组件并实现父子组件双向数据绑定 关于docker jdk1.8镜像中的GB18030-2022标准支持及验证 Go框架gin中的session存储gin-contrib-sessions和go-session 关于修改node_module中的源码问题记录 docker-compose网络和内网服务IP冲突问题 慎用存储过程:一条语句引发的数据库存储100%占用 Spring Boot中4种文件下载方法的实现 避坑-不能将specific类型的gitlab-runner改变为share类型 Docker compose中的MySQL主从复制模式和percona-toolkit工具使用 在minio中开启https访问以及使用rclone备份minio桶 在多机Docker环境下部署Choerodon的解决方案 Prometheus中Monitor添加对SpringBoot Actuator的Basic认证 在Nginx的容器镜像中隐藏Nginx的Server响应头 K8s中的两种nginx-ingress-controller及其区别 两个docker工具:runlike和whaler Grafana中的邮件报警和截图插件grafana-image-enderer K8s中externalName-service和services-without-selectors maven配置文件settings.xml中的一些概念总结 K8s中flexvolume插件驱动的安装 K8s中使用Ingress访问请求体过大问题解决
K8s中的coredns无法解析svc问题排查
ycyin · 2022-07-29 · via 小松鼠的博客

2022年7月29日大约 2 分钟云原生k8scoredns


我们知道k8s中可以通过服务名进行调用,初次部署coredns后正常运行但无法解析服务名,导致各pod之间通信不能通过svc,排查后发现kube-proxy报如下错误:

[root@k8s-node2 ~]# systemctl status kube-proxy -l
● kube-proxy.service - Kubernetes Proxy
   Loaded: loaded (/usr/lib/systemd/system/kube-proxy.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2022-04-24 22:46:27 EDT; 6h ago
 Main PID: 3134 (kube-proxy)
   CGroup: /system.slice/kube-proxy.service
           └─3134 /opt/kubernetes/bin/kube-proxy --logtostderr=false --v=2 --log-dir=/opt/kubernetes/logs --config=/opt/kubernetes/cfg/kube-proxy-config.yml

Apr 24 22:46:27 k8s-node2 systemd[1]: Started Kubernetes Proxy.
Apr 24 22:46:31 k8s-node2 kube-proxy[3134]: E0424 22:46:31.258995    3134 node.go:161] Failed to retrieve node info: Get "https://192.168.88.113:6443/api/v1/nodes/k8s-node2": dial tcp 192.168.88.113:6443: connect: no route to host
Apr 24 22:46:45 k8s-node2 kube-proxy[3134]: E0424 22:46:45.979680    3134 node.go:161] Failed to retrieve node info: Get "https://192.168.88.113:6443/api/v1/nodes/k8s-node2": net/http: TLS handshake timeout
Apr 24 22:46:56 k8s-node2 kube-proxy[3134]: E0424 22:46:56.589155    3134 proxier.go:1644] Failed to delete stale service IP 10.0.0.2 connections, error: error deleting connection tracking state for UDP service IP: 10.0.0.2, error: error looking for path of conntrack: exec: "conntrack": executable file not found in $PATH
Apr 24 22:47:25 k8s-node2 kube-proxy[3134]: E0424 22:47:25.572468    3134 proxier.go:778] Failed to delete kube-system/kube-dns:dns endpoint connections, error: error deleting conntrack entries for udp peer {10.0.0.2, 10.244.1.27}, error: error looking for path of conntrack: exec: "conntrack": executable file not found in $PATH
Apr 25 05:06:00 k8s-node2 kube-proxy[3134]: E0425 05:06:00.578223    3134 proxier.go:778] Failed to delete kube-system/kube-dns:dns endpoint connections, error: error deleting conntrack entries for udp peer {10.0.0.2, 10.244.1.31}, error: error looking for path of conntrack: exec: "conntrack": executable file not found in $PATH
Apr 25 05:06:08 k8s-node2 kube-proxy[3134]: E0425 05:06:08.888616    3134 proxier.go:1644] Failed to delete stale service IP 10.0.0.2 connections, error: error deleting connection tracking state for UDP service IP: 10.0.0.2, error: error looking for path of conntrack: exec: "conntrack": executable file not found in $PATH

解决:

从kube-proxy入手,最后发现当前CentOS 系统,内核版本为 3.10,升级系统内核版本得到解决。

排查过程可参考如下链接。

参考:

https://www.it610.com/article/1304231658370666496.htm
https://blog.csdn.net/AbnerKou/article/details/122515118
https://blog.csdn.net/xuxingzhuang/article/details/117019186
https://www.cnblogs.com/wangz-/articles/13034702.html