Kubernetes 验证 DNS

创建一个 busybox pod

kubectl run -it --image=busybox:1.28.3 --restart=Never dns-test /bin/sh

检查 DNS

/ # nslookup kubernetes.default

正常输出类似:

Server: 10.96.0.10 
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local 
Name: kubernetes.default 
Address 1: 10.96.0.1 kubernetes.default.svc.cluster.local

错误输出类似:

Errors such as the following message indicate a problem with DNS: 
Server: 10.0.0.10 
Address 1: 10.0.0.10
nslookup: can't resolve 'kubernetes.default'

你可能感兴趣的:(Kubernetes 验证 DNS)