k8s的dns问题,安装redis时nslookup redis-app-0.redis-service错误

k8s的dns启动正常,但是在安装redis时nslookup redis-app-0.redis-service错误为:server can't find redis-app-0.redis-service: NXDOMAIN

下面是k8s的system命名空间,可以看到dns是启动的
[k8s@centos01 kubernetes-dashboard]$ kubectl get pods -n kube-system
NAME READY STATUS RESTARTS AGE
coredns-5c98db65d4-sjmp5 1/1 Running 10 18d
coredns-5c98db65d4-v9zfs 1/1 Running 10 18d
etcd-centos01 1/1 Running 13 18d
kube-apiserver-centos01 1/1 Running 15 18d
kube-controller-manager-centos01 1/1 Running 15 18d
kube-flannel-ds-amd64-cc9nc 1/1 Running 16 18d
kube-flannel-ds-amd64-hzvxc 1/1 Running 9 18d
kube-flannel-ds-amd64-l48zg 1/1 Running 9 18d
kube-proxy-8r2rj 1/1 Running 11 18d
kube-proxy-gbvr8 1/1 Running 9 18d
kube-proxy-m85wg 1/1 Running 9 18d
kube-scheduler-centos01 1/1 Running 14 18d
kubernetes-dashboard-f4f9ff989-blfkh 1/1 Running 9 17d

下面是nslookup redis时报的错误:
[k8s@centos01 kubernetes-dashboard]$ kubectl run -i --tty --image busybox dns-test --restart=Never --rm /bin/sh
If you don't see a command prompt, try pressing enter.
/ # nslookup redis-app-0.redis-service
Server: 10.96.0.10
Address: 10.96.0.10:53

** server can't find redis-app-0.redis-service: NXDOMAIN

*** Can't find redis-app-0.redis-service: No answer

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问