[Mac] K3s DNS server
See original GitHub issueThis is dependent on https://github.com/rancher-sandbox/rancher-desktop/issues/699, also see https://github.com/k3s-io/k3s/issues/4087 for more context.
The use case is that people use VPN clients like AnyConnect that does Split DNS. I understand Rancher VM is different from default Lima Ubuntu VM, but in Ubuntu dns
settings from lima.yaml
ends up in systemd-resolved
. It can be fed to K3s at installation with url -sfL https://get.k3s.io | sh -s - --resolv-conf /run/systemd/resolve/resolv.conf
.
I am not sure what the mechanism Rancher VM is using for DNS - it is probably not systemd-resolved
, but the point is - once #699 is solved - we need a way to pass DNS configuration down to the coredns
somehow.
This seems to be working out of the box in WSL2 - so it’s only a Mac issue.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (7 by maintainers)
I’m now researching a different approach for DNS in Lima: run a DNS server in a goroutine inside the hostagent and forward it to the VM. The host agent DNS would then look up type
A
requests by doing a local lookup instead of forwarding to a name server.That way we should always get the name resolution from the host, so this would also deal with conditional forwards correctly by default. So any VPN changes would be visible right away without even restarting the VM.
Inside the guest the only nameserver would be the one forwarded from the host; no alternates (similar to how systemd-resolved configures
127.0.0.53
).Still needs more research, but feels promising.
To note, this issue is marked done based on prior troubleshooting efforts but the new #770 picks up where we need to go next.