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
Install on a system using `systemd-resolved` leads to broken DNS #273
What keywords did you search in kubeadm issues before filing this one?
systemd resolved dns
Is this a BUG REPORT or FEATURE REQUEST?
kubeadm version (use
Installed kubernetes on bare metal using kubeadm. Dns inside pods did not work.
What you expected to happen?
Would expect dns inside pods to work.
How to reproduce it (as minimally and precisely as possible)?
Anything else we need to know?
As noted in kubernetes/kubernetes#45828, the problem is due to the fact that on a normal Ubuntu desktop (and maybe other desktop Linux OSes),
The correct thing to do is to add
referenced this issue
May 19, 2017
This was referenced
May 29, 2017
As an FYI: as I commented on kubernetes/kubernetes#45828, I don't believe that over-riding kubelet's resolv.conf reference will work anyway. This will just dump a broken (referencing 127.0.0.53) resolv.conf into all the pods and bypass cluster-local resolution. The current state of affairs is that just external resolution is broken because kube-dns has a broken upstream, but it is able to stub the cluster-local zones off to k8s. The only fix I can see is adding / editing config to kube-dns / CoreDNS.
@mt-inside that's why pointing
@antoineco I agree that'll get
By default, if
What you described is the behaviour of
@antoineco Ah, you're right. I was confused about dnsPolicy. I was confused about what coredns is running as, because Default isn't the default. I also confused myself by looking at a ClusterFirst Pod that was failing back to Default when I didn't specify --cluster-dns in some of my tests. Also the scope of --resolv-conf (not applying to ClusterFirst) and --cluster-dns (not applying to Default) isn't documented, and I didn't think of it until I really grokked the different dns modes.
I agree this fix is perfectly sensible.
@timothysc Sorry, it's not spelt out. A combination of what @antoineco says here and @thockin says on kubernetes/kubernetes#45828
However (deferring to the kubeadm authors here):
This was referenced
Mar 6, 2018
I've hit the very same issue with kubeadm 1.10.0 and CoreDNS - with even worse results, as CoreDNS asked to resolve any external name starts looping to itself, consuming all allowed RAM and getting OOM-killed.
Obviously it can be fixed either by
I've raised an issue in CoreDNS tracker for better handling of such a misconfiguration on CoreDNS side: coredns/coredns#1647