Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
kube-dns copies 127.0.0.35 from host's /etc/resolv.conf, doesn't work #45828
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.): no
What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.): kube-dns resolv.conf
Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT
Kubernetes version (use
Environment: ubuntu 17.04
After installing on baremetal ubuntu 17.04 (my desktop), kube-dns not working
What you expected to happen:
dns should work
How to reproduce it (as minimally and precisely as possible):
Follow the kubeadm install steps on ubuntu 17.04
Anything else we need to know:
As far as I was able to track down (and temporarily solve), my ubuntu desktop has an
When kube-dns starts, the dnsmasq container somehow ignores the
Obviously, 127.0.0.35 doesn't work inside the pods. It should never have been used in the first place. There's a reason why docker daemon has
The fact that you're using
Note: even when using
Well, my "particular case" is a standard Ubuntu desktop install. Yes, I grant you that no person in their right mind would run Network Manager in a Ubuntu Server, but this is Desktop, it is normal.
If you think it's OK for kubeadm to not install correctly by default to a Ubuntu desktop, only server, I accept it, but it's a pity, Kubernetes should try harder be easy to install in a developer box. And, no, minikube is not a good solution, due to numerous vboxsf filesystem bugs which make host files volume mounting frustrating, also due to the added memory consumption and cpu overhead of virtualbox.
BTW, the workaround I've used was to create a
It's not that uncommon I agree, any distribution using
Can you check the content of this file on your machine?
The above configuration, if it were to be copied into kube-dns, should work.
So, as mentioned by @thockin, setting
How about raising a feature request in the kubeadm repo to default to that file in case
referenced this issue
May 19, 2017
I changed this line:
Which worked perfectly, and my pods can now access the internet as normal:
Maybe adding a check to
referenced this issue
Dec 11, 2017
I'm sure there are other factors at play that I'm not aware of, but I'd just like to report that my pods are able to communicate out to the internet as well as to other pods in the cluster via DNS hostname (I haven't tried exposed services yet), and I haven't had networking issues since changing my config to the value I mentioned above.
Again, I'm sure there are complexities I'm not aware of. Just wanted to report my own experience and I'd be happy to answer any debugging questions.