-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to override CoreDNS forward? #10951
Comments
The issue stems from the fact that a local resolver would only listen on 127.0.0.1, so even if we were to "forward" to the node IP, it would get rejected, unless the local resolver would listen on 0.0.0.0. We may be able to get around it by using iptables to route these requests. Especially in single-node installs, it would be great to resolve it generically. |
You can't use a local resolver on 127.0.0.1 within containers, as each pod has its own loopback address within the pod's network namespace - it will not reach the host's loopback interface. You should give your local resolver an actual IP on your network, and either put that in the host's resolv.conf, or create another resolv.conf with the preferred configuration, and point k3s at that file with the --resolv-conf flag. |
Hi. I'm having trouble using my private DNS for coredns as described here: #7822
My host's
/etc/resolv.conf
contains only one nameserverDNS resolving on the host works fine but not in CoreDNS.
What I tried:
Create a custom-dns configmap (not working)
Using resolv.conf (not working)
Hacking the coredns ConfigMap
What works is the following in
Corefile
:But I don't want to override
/var/lib/rancher/k3s/server/manifests/coredns.yaml
orcoredns
ConfigMap.Creating an own zone
What also works is creating a custom zone.
But I don't want to create a specified zone but using the forward for all requests not known to the cluster. I want either to add
coredns-custom
to override the default forward or get coredns using the host's DNS (/etc/resolv.conf
)References:
The text was updated successfully, but these errors were encountered: