Stop k3d from reaching out to 8.8.8.8 (Google) #711
-
I am trying to run k3d in an air gapped network and noticed that k3s/k3d keeps reaching out to 8.8.8.8(Google). In my server-0 container there is a /tmp/k3s-resolve.conf and it seems there is a "nameserver: 8.8.8.8" config. What is this used for, and how can I configure my k3d install to point to somewhere else (or to nowhere if appropriate)? Thanks! EDIT: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
https://github.com/k3s-io/k3s/pull/265/files ^ appears to be related, however I have an /etc/resolv.conf so I am not sure why this is being made. https://github.com/k3s-io/k3s/blob/master/pkg/agent/config/config.go#L312-L328 ^ this code appears to check to see if /etc/resolv.conf is valid, and then if it is not make one. There is a /etc/resolv.conf file in the server-0 container. Is this a valid file? why is this code snippet even getting to the point where to creates a file in the tmp directory with 8.8.8.8? |
Beta Was this translation helpful? Give feedback.
-
Possible bug: the /etc/resolv.conf file provided in the k3d install does not appear to actually work/be valid. When I manually specify the --resolv-conf flag under k3s extra server args in the conf and point it to /etc/resolv.conf coredns actually wont spin up properly |
Beta Was this translation helpful? Give feedback.
-
I added a volume mount for my host's /etc/resolv.conf on top of the one existing inside the container at /etc/resolv.conf which appears to have fixed the issue. |
Beta Was this translation helpful? Give feedback.
I added a volume mount for my host's /etc/resolv.conf on top of the one existing inside the container at /etc/resolv.conf which appears to have fixed the issue.