Skip to content

fix(devcontainer): use Docker's upstream DNS for the cluster - #8

Open
m1p1h wants to merge 1 commit into
mainfrom
fix/k3s-upstream-dns
Open

m1p1h wants to merge 1 commit into
mainfrom
fix/k3s-upstream-dns

Conversation

@m1p1h

@m1p1h m1p1h commented Nov 12, 2026

Copy link
Copy Markdown

Fix for issue encountered running kid locally on Mac: Argo CD cannot resolve github.com and the root AoA errors with ComparisonError ("lookup github.com on 10.43.0.10:53: server misbehaving"), so nothing past bootstrap is deployed.

Docker gives the k3s-server container "nameserver 127.0.0.11", which pods cannot reach, so k3s falls back to 8.8.8.8. Networks that block DNS to public resolvers (corporate, university, NHS, VPNs) then break all external name resolution in the cluster:

Move the k3s entrypoint into .devcontainer/k3s-entrypoint.sh and pass k3s --resolv-conf with the non-loopback upstream servers Docker records in /etc/resolv.conf ("# ExtServers: [host(...)]"). KID_UPSTREAM_DNS overrides the detection; if nothing usable is found, k3s keeps its 8.8.8.8 default.

Also shellcheck the new script and add a troubleshooting entry.

Docker gives the k3s-server container "nameserver 127.0.0.11", which pods
cannot reach, so k3s falls back to 8.8.8.8. Networks that block DNS to public
resolvers (corporate, university, NHS, VPNs) then break all external name
resolution in the cluster: Argo CD cannot resolve github.com and the root app
stays in ComparisonError ("lookup github.com on 10.43.0.10:53: server
misbehaving"), so nothing past bootstrap is deployed.

Move the k3s entrypoint into .devcontainer/k3s-entrypoint.sh and pass k3s
--resolv-conf with the non-loopback upstream servers Docker records in
/etc/resolv.conf ("# ExtServers: [host(...)]"). KID_UPSTREAM_DNS overrides
the detection; if nothing usable is found, k3s keeps its 8.8.8.8 default.

Also shellcheck the new script and add a troubleshooting entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@m1p1h
m1p1h requested a review from Alwin-K-Thomas November 12, 2026 15:03

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant