Open giulianopz opened 1 month ago
Hey! Thanks for this extensive report :)
Why is this feature enabled by default? Is this the intended behavior or do I have some issues with local machine configuration?
Because many people had this problem and no one ever (until now) reported any issue with it (it's also on by default in e.g. kind
).
So it made sense to enable it by default.
I have a similar setup (k3d version, docker version, ubuntu version) and a local search domain in the resolv.conf - I don't have any problem at all.
I'm also honestly unsure where I would start debugging this. Probably by playing with dig
and DNS lookup traces.
What did you do
How was the cluster created?
k3d cluster create test1
(default is K3D_FIX_DNS=1)What did you do afterwards? It's not possible to reach servers external to the cluster due to DNS resolution being broken:
Non-authoritative answer: Name: google.com.homenet.telecomitalia.it Address: 127.0.0.1 ~$ k exec -it dnsutils -- cat /etc/resolv.conf search default.svc.cluster.local svc.cluster.local cluster.local homenet.telecomitalia.it nameserver 10.43.0.10 options ndots:5
What did you expect to happen
External domain names should not be resolved to 127.0.0.1.
Screenshots or terminal output
If I disable the DNS fix setting K3D_FIX_DNS to 0, everything works as expected:
Which OS & Architecture
Which version of
k3d
Which version of docker
I know that the DNS fix causes the script
k3d-entrypoint-dns.sh
to be registered as a hook for the server node, altering the iptables rules and resolv.conf file inside the container.This is supposed to 'forward DNS queries to your local machine, e.g. to use your local company DNS', quoting the changelog. But I don't need this feature since I'm not behind a company VPN.
Why is this feature enabled by default? Is this the intended behavior or do I have some issues with local machine configuration?