Monday, June 10, 2019

Tip to Verify KubeDNS is Working From Host


Sometimes we need to verify KubeDNS is working from host OS( ie VM ).


  • Find KubeDNS service IP address via command
kubectl run -i --tty busybox --image=busybox --restart=Never -- cat /etc/resolv.conf
  • install nc if necessary. ie yum install nc
  •  ie the IP address is , then run while loop to check each KubeDNS pod is responding. You may get timeout or can't resolve error if one of the pods is not working
while true;do nc -vz 53;sleep 3; done
  • More debug details please refer K8S doc 

No comments: