Skip to content

Instantly share code, notes, and snippets.

@bioshazard
Last active June 6, 2023 15:23
Show Gist options
  • Save bioshazard/6fc9af3f5d8c3b7ab086285ce4c0e644 to your computer and use it in GitHub Desktop.
Save bioshazard/6fc9af3f5d8c3b7ab086285ce4c0e644 to your computer and use it in GitHub Desktop.

Use custom upstream DNS with CoreDNS

In my use case, I run a K3D cluster in my home and wanted to resolved my local .home.arpa domain hosts (eg ponics.home.arpa) via my router DNS from the pods rather than setting static IPs in DHCP and manifests.

The solution was pretty simple: update in kubectl edit cm/coredns -n kube-system to replace in forward . 192.168.0.1 so domains not handled by CoreDNS used my router as the upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment