question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Mac] K3s DNS server

See original GitHub issue

This 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:closed
  • Created 2 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
janduboiscommented, Sep 30, 2021

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.

0reactions
gaktivecommented, Oct 12, 2021

To note, this issue is marked done based on prior troubleshooting efforts but the new #770 picks up where we need to go next.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Options and Configuration | K3s
This section contains advanced information describing the different ways you can run and manage K3s, as well as steps necessary to prepare ...
Read more >
[BUG] DNS not resolving · Issue #209 · k3d-io/k3d - GitHub
It just mounts the volume to the container running the k3s server. ... the target for DNS requests, so I could add this...
Read more >
Kubernetes + Rancher Cluster Manager 2.6 on your macOS ...
This article shows how to set up a minimal Kubernetes local lab dev env with the shiny new Rancher Cluster Manager 2.6 on...
Read more >
Provision K3S cluster on mac using K3D - Medium
This is second part of series to provision k3s cluster on Mac using k3d ... INFO[0001] Creating node 'k3d-devcluster-server-0' ... CoreDNS is running...
Read more >
Running Containerd and k3s on MacOS - Akihiro Suda, NTT ...
Don't miss out! Join us at our upcoming hybrid event: KubeCon + CloudNativeCon North America 2022 from October 24-28 in Detroit (and online!)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found