To verify if the DNS service is normal in a Kubernetes cluster. We can deploy a simple service to diagnose this:
$ kubectl apply -f nginx.yaml
$ kubectl exec -it web-0 sh # enter web-0 pod to resolve the other two pods domain name.
/ # nslookup web-1.nginx
/ # nslookup web-2 nginx