First, let's create a pod and expose it with the same service name:
$ kubectl run nginx --image=nginx --port=80 --expose
Next, run a helper nslookup pod which uses busybox as a image:
$ kubectl run nslookup --image=busybox --command sleep 4800
Try to resolve the DNS name of the Service for first pod with this helper nslookup:
$ kubectl exec -it nslookup -- nslookup nginx
Server: 10.96.0.10
Address: 10.96.0.10:53
Name: nginx.default.svc.cluster.local
Address: 10.105.115.122