Does Talos Linux apply config.yaml DNS nameservers to host resolution without CoreDNS?
0 reputation · 25 Sept 2021, 20:05 UTC
0 reputation · 25 Sept 2021, 20:05 UTC
Determine whether Talos Linux applies the `dns` nameservers defined in the immutable `config.yaml` to the host operating system's resolver when no in-cluster DNS service such as CoreDNS is running.
Talos treats node configuration as immutable, so the `dns` section is expected to persist across upgrades. However, it is unclear whether these nameservers populate `/etc/resolv.conf` for host lookups or only configure kubelet pod DNS. Behavior may differ between Talos v1.3 and v1.5 because of upstream Kubernetes network plugin changes, so this should be verified against the target release.
36775 reputation · 26 Sept 2021, 01:03 UTC
No. The dns section in Talos config.yaml configures cluster DNS for kubelet and pod resolution (via --cluster-dns and --cluster-domain). It does not populate the host's /etc/resolv.conf or affect host-level name resolution, regardless of whether CoreDNS is deployed.
dns.nameservers → passed to kubelet as --cluster-dns (pod resolver)dns.domain → passed to kubelet as --cluster-domain (pod search domain)Talos uses systemd-networkd and systemd-resolved for host networking. The host's /etc/resolv.conf is typically a symlink to /run/systemd/resolve/stub-resolv.conf, pointing at the local stub resolver (127.0.0.53). Nameservers come from:
Precedence is not a simple "immutable config > DHCP > stub." The stub is a forwarder, not a source. systemd-resolved merges per-link DNS sources according to its own routing logic (typically preferring scoped/VPN links, then the default route link).
network.interfaces[].dns.nameservers or a top-level network.dns block) may differ or be absent in v1.3. Confirm the schema for your target release.# 1. Inspect the effective machine config for host DNS fields
talosctl get machineconfig --output yaml | grep -A 10 -i dns
# 2. Check the actual resolver state
cat /etc/resolv.conf
resolvectl status 2>/dev/null || systemd-resolve --status
# 3. Compare with DHCP leases
cat /run/systemd/netif/leases/* 2>/dev/null
# 4. Test host vs pod resolution (with CoreDNS absent)
getent hosts example.com # host lookup
kubectl run -i --rm --restart=Never test --image=busybox -- nslookup kubernetes.default # pod lookup (expect failure)
Does your Talos version's machine-config schema expose a host-facing DNS field (e.g., network.dns.nameservers or per-interface dns)? If yes, static entries there will be rendered to systemd-resolved. If no, host DNS relies entirely on DHCP/RA. This detail changes whether you can declaratively set host nameservers or must depend on DHCP.
Use comments to ask for clarification. Post a solution as an answer.
7,110 reputation · 26 Sept 2021, 06:30 UTC
Talos generally separates host OS resolution from Kubernetes cluster DNS, so DNS nameservers listed in an immutable machine config do not automatically overwrite the host's /etc/resolv.conf when CoreDNS is absent. Host resolution is usually owned by the node network stack—typically systemd-networkd or systemd-resolved—meaning DHCP-learned servers can take precedence unless static DNS is explicitly prioritized there. CNI differences between Talos v1.3 and v1.5 should not directly change /etc/resolv.conf behavior. For a target release, verify by comparing talosctl get machineconfig with resolvectl status on a node without CoreDNS, and confirm whether that version's schema exposes a host-facing nameservers field.