Kubernetes busybox nslookup问题
使用最新版本的busybox会出现nslookup提示无法解析的问题:
Server: 10.96.0.10 Address: 10.96.0.10:53 ** server can't find kubernetes: NXDOMAIN *** Can't find kubernetes: No answer
该问题是最新busybox image问题导致的,使用老一点的busybox Image版本1.28.3即可成功解析。
[root@node01]# kubectl run -it --image=busybox:1.28.3 --restart=Never dns-test /bin/sh / # nslookup web-0.nginx Server: 10.96.0.10 Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local Name: web-0.nginx Address 1: 10.244.0.78 web-0.nginx.default.svc.cluster.local / # nslookup web-1.nginx Server: 10.96.0.10 Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local Name: web-1.nginx Address 1: 10.244.0.79 web-1.nginx.default.svc.cluster.local