Resolving home.arpa names inside K3s pods with coredns-custom
One authoritative zone for internal names, served by K3s CoreDNS.
Status: Supersedes the hostAliases steps in the Kaneo and Argo CD recipes.
What it’s for
Section titled “What it’s for”Letting every pod resolve internal names, without per-pod hostAliases.
What you need
Section titled “What you need”- K3s with its bundled CoreDNS (it reads the
coredns-customConfigMap)
- Create
coredns-custominkube-systemwith a.serverblock and a zone file:
apiVersion: v1kind: ConfigMapmetadata: name: coredns-custom namespace: kube-systemdata: homelab.server: | home.arpa:53 { file /etc/coredns/custom/home.arpa.db home.arpa } home.arpa.db: | $ORIGIN home.arpa. @ IN SOA ns.home.arpa. admin.home.arpa. 1 3600 600 86400 60 @ IN NS ns.home.arpa. ns IN A <traefik-address-a> *.x1 IN A <traefik-address-a> *.dell IN A <traefik-address-b>- Apply it and restart CoreDNS:
kubectl apply -f coredns-custom.yamlkubectl -n kube-system rollout restart deploy/coredns- Remove the old
hostAliasesfrom your workloads.
Check it worked
Section titled “Check it worked”From a test pod:
dig gitea.example.home.arpareturnsNOERRORwith the address.dig AAAA gitea.example.home.arpareturnsNOERRORwith no answers.dig dl-cdn.alpinelinux.org.home.arpareturnsNXDOMAIN.apk addworks in an Alpine pod.
Traps seen
Section titled “Traps seen”- A
hostsblock in an.overridefile crash-loops CoreDNS:this plugin can only be used once per Server Block. - A
hostsblock with nothing after it answers SERVFAIL for unknown names. musl (Alpine) stops on SERVFAIL while walking search domains. templateruns beforehostsin CoreDNS’s plugin order, so an NXDOMAIN template hides every hosts entry.- The
fileplugin avoids all three.
Where this came from
Section titled “Where this came from”- Kaneo pods could not resolve the Silo hostname (2026-10-17)
- Reviewing phases 1 to 3 (2026-10-20)
- Three CoreDNS ordering problems with home.arpa names (2026-10-20)