Hi community,
I want to raise awareness about a proven architectural conflict between Kubernetes’ default service domain (cluster.local) and the standard Linux Name Service Switch (nsswitch.conf) when implementing strict mDNS security or network isolation policies.
The Proof of Conflict
In environments requiring strict local network privacy (such as edge computing, IoT, or hybrid bare-metal clusters), it is a standard practice to enforce mDNS and prevent local queries from leaking to public or upstream DNS servers.
To achieve this, we configured a strict DNS isolation policy inside a standard Debian-slim container using /etc/nsswitch.conf:
Plaintext
hosts: files mdns4_minimal [NOTFOUND=return]
The expected Linux behavior is definitive:
-
Check
/etc/hosts(files). -
Broadcast via mDNS (
mdns4_minimal) for link-local names. -
If not found, immediately abort and return an error (
[NOTFOUND=return]) to block regular DNS fallback. This is crucial for privacy and preventing traffic leakage.
The Failure: Once this standard Linux policy is applied, all Kubernetes cluster service discovery breaks instantly. Running curl light-http-service.default.svc.cluster.local drops immediately with Could not resolve host.
Why it happens: Because Kubernetes uses .cluster.local as its default domain, the Glibc resolver treats it as an mDNS domain under RFC 6762. The mdns4_minimal plugin attempts a multicast broadcast, fails to find the cluster service on the local link, and the [NOTFOUND=return] rule triggers a hard stop. The resolver completely ignores CoreDNS listed in /etc/resolv.conf, effectively blinding the container to the K8s control plane.
The Core Issue
This is not a bug in Linux, nor is it a bug in CoreDNS—it is a naming collision inherent to Kubernetes’ default design. By adopting .local for a centralized, cluster-wide DNS architecture, Kubernetes directly collides with the IETF standard (RFC 6762) which mandates .local strictly for link-local multicast.
While advanced users can override clusterDomain to .cluster.internal via kubeadm at bootstrap, .cluster.local remains the out-of-the-box default for 99% of the ecosystem.
Discussion Points
-
As Kubernetes continues to expand into IoT and edge environments where mDNS/Avahi coexistence is mandatory, should the default cluster domain be changed to a non-colliding suffix (like
.cluster.internalor.k8s) in future major releases? -
How are edge/hybrid cluster operators managing this collision today without forcing cluster-wide domain rewrites?
I look forward to hearing your insights on this fundamental naming conflict!