I have a pod where getaddrinfo cannot resolve the address to a Kubernetes Service in the same namespace but can connect to the service if I use the IP address instead. Using tcpdump, I can confirm that it does not send DNS queries to nodelocaldns or to coredns. Manually adding the address to /etc/hosts does not resolve the issue. The image of the pod is a derivative of https://github.com/jupyter/docker-stacks/tree/master/datascience-notebook and runs start-singleuser.sh as entry point.

If I create a pod on the same machine but only run sleep as entry point, everything works. This issue also occurs in some of the newer machines (installed around 2 years after the cluster was initially set up).

Any ideas how to fix or troubleshoot this extremely puzzling issue?

  • What Kubernetes version are you using? How have you deployed it? Could you provide a .yaml file of your pod? Sep 23, 2021 at 9:03
  • Hello @ChristianAlis. Any updates? Sep 28, 2021 at 12:48
  • It's running kubernetes 1.19 installed by kubespray 2.15.1. The cluster has been running for 3 years now so there might be changes that were not migrated properly although I used the defaults mostly. I tried running start-singleuser.sh on the working pod but the dns resolution didn't fail afterwards. Sep 28, 2021 at 14:05


You must log in to answer this question.

Browse other questions tagged .