1 comphilip 2021-05-28 13:33:43 +08:00 这个问题一般是底层的 CNI 插件配置错了。 |
![]() | 2 swulling 2021-05-28 13:41:53 +08:00 via iPhone 不要用 Ping 来测试 Service,没有意义。 ping 的通 ping 不通和 Service 可用不可用没啥关系。 |
3 CaptainDK 2021-05-28 13:47:53 +08:00 几个 node ? ping 的通和 ping 不通的 pod 分别运行在哪个 node 上? |
4 GjriFeu 2021-05-28 13:54:12+08:00 via iPhone 检查一下 node 上的 cni pod 起来了没 |
![]() | 5 zoharSoul 2021-05-28 14:01:38 +08:00 ![]() 开 ssh,我上去看看 |
![]() | 9 defunct9 OP @CaptainDK 1 个 master,2 个 worker 。无论那个 worker 只要跑这个 radial/busyboxplus:curl 就不行。 |
![]() | 10 defunct9 OP @swulling ping 是个基本测试手段. 用 curl http://nginx-svc 一样不通。curl http://nginx-svc.default 就是通的 |
![]() | 11 defunct9 OP @swulling can't resolve 才去 ping 的 [ root@curl:/ ]$ curl http://my-nginx curl: (6) Couldn't resolve host'my-nginx' [ root@curl:/ ]$ curl http://my-nginx.default <!DOCTYPE html> <html> <head> <title>Welcome to nginx!</title> <style> body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; } </style> </head> <body> <h1>Welcome to nginx!</h1> <p>If you see this page, the nginx web server is successfully installed and working. Further configuration is required.</p> <p>For online documentation and support please refer to <a href="http://nginx.org/">nginx.org</a>.<br/> Commercial support is available at <a href="http://nginx.com/">nginx.com</a>.</p> <p><em>Thank you for using nginx.</em></p> </body> </html> |
![]() | 12 daimaosix 2021-05-28 15:44:29 +08:00 开 ssh,让我上去看看 |
![]() | 13 masha 2021-05-28 16:11:11 +08:00 开 ssh,让我上去看看 |
![]() | 14 masha 2021-05-28 16:12:22 +08:00 看下有问题 pod 的 /etc/resolv.conf? |
![]() | 15 masha 2021-05-28 16:13:28 +08:00 看下是不是 https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/这边描述的的 Known issues 里的问题 |
![]() | 18 defunct9 OP @masha 跟阿里 ack 正常的 resolv.conf 比过,一样。dns-debugging-resolution 的也试了一遍了,不行。coredns 降到 1.6.7,加上 upstream,同时打开 pods verified 和 autopath @kubernetes,也不行。 |
![]() | 19 defunct9 OP @swulling 这个 debug 顺序没什么奇怪的吧,pod 都是大平板市场,普通开放的 svc 都是 cluster ip,ping 一下,然后再看服务是否正常,是正常顺序吧。 |
![]() | 20 raysonx 2021-05-28 16:38:37 +08:00 kube-proxy 默认的 backend |
![]() | 21 raysonx 2021-05-28 16:42:01 +08:00 kube-proxy 默认的 backend 是 iptables,通过 DNAT 做的转发。因为只转发了 service 的端口,你是 ping 不通的。 如果用 ipvs backend,service 的 ip 会自动赋给所有 node 的 ipvs 虚拟网卡,是可以 ping 通的。 如果是有些 node 通有些不通,可能是 cni 有问题,或者是那个节点的 kube-proxy 没启动。 |
![]() | 22 raysonx 2021-05-28 16:45:12 +08:00 楼主提供的信息太少了,单纯这样也只是猜测。不如开 SSH 让我上去看看 ( doge ) |
23 iphoneXr 2021-05-28 16:55:01 +08:00 开 ssh,让我上去看看 |
![]() | 24 KaynW 2021-05-28 17:00:25 +08:00 没头绪, 开 ssh, 让我上去看看 |
![]() | 25 masha 2021-05-28 17:06:04 +08:00 @defunct9 不是,我的意思是你看看这个 https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/#known-issues,dns search 记录的问题。从你的现象来看就是从 search 记录找不到*.default 这个后缀。 我印象里以前也遇到过这个问题,不过不搞 k8s 比较久了没清晰记忆了。 |
![]() | 26 defunct9 OP 不用猜了,busybox 的 bug,升级过的 busybox 就是好的。所以么,不要随便用 radial/busyboxplus:curl 这个镜像。另外,这个镜像在阿里的 ack 居然是好的,猜不透原因。 |
27 julyclyde 2021-05-28 17:57:09 +08:00 clusterIP 本来就不是让你 ping 的 |
![]() | 28 shyy228 2021-05-28 18:10:33 +08:00 via iPhone 开 ssh,我上去看看 |
![]() | 29 mritd 2021-05-28 18:59:18 +08:00 via iPhone coredns 默认域有问题 |
![]() | 30 skies457 2021-05-28 23:07:37 +08:00 可能是 ndots 的问题,试试在 /etc/resolv.conf 里加上 options ndots:5 https://pracucci.com/kubernetes-dns-resolution-ndots-options-and-why-it-may-affect-application-performances.html |
![]() | 31 simo 2021-05-29 10:44:54 +08:00 开 ssh,我上去看看看不懂 |
![]() | 32 mogging 2021-11-12 13:01:38 +08:00 via Android 上 nodelocaldns 试试 |