Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to enter a kubernetes pod. Error from server: error dialing backend: dial tcp: lookup (node hostname) on 168.63.129.16:53: no such host

We have deployed a K8S cluster using ACS engine in an Azure public cloud. We are able to create deployments and services but when we enter a pod using "kubectl exec -ti (pod name) (command)" we are receiving the below error,

Error from server: error dialing backend: dial tcp: lookup (node hostname) on 168.63.129.16:53: no such host

I looked all over the internet and performed all I could to fix this issue but no luck so far. The OS is Ubuntu and 168.63.129.16 is a public IP from Azure used for DNS.(refer below link)

https://blogs.msdn.microsoft.com/mast/2015/05/18/what-is-the-ip-address-168-63-129-16/

I've already added host entries to /etc/hosts and entries into resolv.conf of the master/node server and nslookup resolves the same. I've also tested by adding --resolv-conf flag to the kubelet but still it fails. I'm hoping that someone from this community can help us fix this issue.

like image 671
Leo Lazarus Avatar asked Nov 16 '17 19:11

Leo Lazarus


1 Answers

Verify the node on which your pod is running can be resolved and reached from inside the API server container. If you added entries to /etc/resolv.conf on the master node verify they are visible in the APIserver container, if they are not, restarting the API server pod might be helpful

like image 82
Sreekanth Pothanis Avatar answered Oct 26 '22 02:10

Sreekanth Pothanis