-
Notifications
You must be signed in to change notification settings - Fork 521
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
Split dns on talos machine config #7287
Comments
Long-term I feel we should have system extensions which are critical and run always, and probably have a way to override/inject values into For the registry endpoint, you can use registry mirror config to resolve it to a Tailscale IP, as these are assigned in a static way. |
@btrepp Maybe you can clear up my confusion.. I appear to be able to use Split DNS with the extension. However, I'm running Talos in a VM on a host machine that is itself part of the tailnet. Could this be the reason Split DNS works, because DNS queries are forwarded outside of the VM to the host's DNS, which is configured with Split DNS? Search Domains is the feature that fails, presumably because it requires edits to /etc/resolv.conf, even if it's running in said VM. I create CP nodes named It's when I configure Search Domains for |
Yep. I think basically dns will go up the stack.
For me. It's metal Talos -> router
For you it would be Talos -> vm host.
As the extension runs in a container. It doesn't change the Talos Configs.
I did experiment with modifying resolve.conf but ended up having a bad time
with it.
…On Mon, 21 Aug 2023, 08:37 Mike Beaumont, ***@***.***> wrote:
@btrepp <https://github.com/btrepp> I appear to be able to use Split DNS
with the extension. However, I'm running Talos in a VM on a host machine
that is itself part of the tailnet. Could this be the reason Split DNS
works, because DNS queries are forwarded outside of the VM to the host's
DNS, which is configured with Split DNS?
Search Domains is the feature that fails, presumably because it requires
edits to /etc/resolv.conf, even if it's running in said VM.
I create CP nodes named cp-0 with the tailscale extension and set the
Kubernetes endpoint to be cp.ts. I've got CoreDNS running outside of
Talos configured to answer with a CNAME pointing to cp-0.my-tailnet.ts.net
when queried for cp.ts. This CoreDNS is configured for .ts using Split
DNS. Everything seems to work... Is it going to go horribly wrong at some
point, assuming I keep the VM on a host in the tailnet?
It's when I configure Search Domains for ts and use cp as the Kubernetes
endpoint that something seems wrong, namely that although everything seems
Healthy and the node is Ready, the node can't reach the API server at cp.
Perhaps I could even configure libvirt's dnsmasq to include the search
domain...
—
Reply to this email directly, view it on GitHub
<#7287 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACAGFIOIBIUELN6HHHR6HDXWKUTPANCNFSM6AAAAAAYRQAZJA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This would definitely still be a great feature! |
now that host-dns exists, maybe this is now possible to implement? |
It should work in |
does that mean that |
I don't know what you're talking about, sorry. I have no idea about Tailscale, all I said is that split DNS should work in |
I do not known about tailscale either, since you were the one mentioning it, I wanted to clarify whether this feature was tied to tailscale. By your answer, I will assume, it's not tied to tailscale. :-) How do I configure this? The 1.8 docs at https://www.talos.dev/v1.8/talos-guides/network/host-dns/ do not seem to mention how to configure this feature. |
There is no feature at all, it will just correctly iterate over nameservers configured in case if one returns |
@smira AFAICT this doesn't happen with Line 147 in 7edcbbb
Is there anything standing in the way of just switching to coredns for node DNS as a separate service? It's not possible to workaround this either because the order of resolvers doesn't appear to be totally under the users control: talos/internal/app/machined/pkg/controllers/network/dns_resolve_cache.go Lines 158 to 172 in 7edcbbb
My router DNS seems to always show up first in the list, probably because it comes from DHCP before the machine config is applied. |
I believe DNS server shouldn't return NXDOMAIN if it doesn't know about the domain, so the DNS server is wrong (if I'm wrong, easy to fix). The DNS servers on initial boot before machine config is applied can be controlled via kernel cmdline, but the machine config overwrites any DNS servers configured by other means. |
I do agree, just wanted to make it clear it doesn't work with NXDOMAIN, only SERVFAIL. I think the issue is that Tailscale uses
It doesn't, from my testing. EDIT: removed irrelevant code refs What I see:
|
Probably it makes sense to create issues with full description for both, as I don't quite understand your case. Your tailnet resolver should come before CloudFlare one. DNS servers should be completely changeable with meachine config. |
Feature Request
Allow configuring certain domains to be forwarded to other DNS resolvers.
Description
I've been developing a Tailscale extension to allow talos nodes to have Tailscale IPs (and the long term goal is to talk to backend services such as storage, over a Tailscale network).
siderolabs/extensions#154
One of the issues is that it would be great to uses tail scales magic dns, so you can do things like 'nas' in your config files and dns will point you to the correct Tailscale machine.
Tailscale includes this, however it tries to write over /etc/resolv.conf. This works great if I bind mount it, but when things go wrong, they go really wrong.
Current workaround
At the moment you can run a DNS server externally and configure how you wish, but it does become more external infrastructure you need to maintain. Alternatively you can use your Tailscale IPs directly, but then you do have to make sure the IPs are aligned (and if talos wipes a disk, you are getting a new IP from Tailscale).
The text was updated successfully, but these errors were encountered: