Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION/HELP] k3d dns server does not go through vpn. #1017

Closed
heesuk-ahn opened this issue Mar 15, 2022 · 2 comments
Closed

[QUESTION/HELP] k3d dns server does not go through vpn. #1017

heesuk-ahn opened this issue Mar 15, 2022 · 2 comments
Labels
question Further information is requested
Milestone

Comments

@heesuk-ahn
Copy link

Question / Where do you need Help?

Currently, Kubernetes is created with k3d and a pod is making a request to a server in the company network. (bitbucket repo in vpn)

Here, some people normally get clones from the bitbucket repo in vpn, but some people are getting a connection timeout.

My guess is that in some cases this is a problem caused by the host's /etc/resolv.conf not being used.

Can I adapt the k3d clsuter to use the nameserver used by the VPN in this case?

Scope of your Question

k3d version v5.3.0
k3s version v1.22.6-k3s1 (default)
@heesuk-ahn heesuk-ahn added the question Further information is requested label Mar 15, 2022
@heesuk-ahn
Copy link
Author

In my case, mac os catalina, I was able to turn on the VPN and call the service behind the VPN without any problem.

However, after upgrading the mac os version to monterey, a connection timeout occurred when calling a service behind a VPN.

In this case, /etc/resolv.con pointed to by k3d core dns pointed to 127.0.0.11, which is docker internal dns.

after debugging, I checked this issue https://github.com/k3d-io/k3d/issues/209 and then I got to know a new feature for https://github.com/k3d-io/k3d/pull/721 patch.

so, I also adjusted this toggle flag in local env

export K3D_FIX_DNS=1 

After this setting is applied, k3d's cluster core dns no longer points to 127.0.0.11 but to 192.168.65.2 dns server.

$ docker ps

CONTAINER ID  
c2d7a59eb073   rancher/k3s:v1.21.10-k3s1  ... # agent for k3d node

$ docker exec -it c2d7a59eb073 sh
/ # cat /etc/resolv.con
nameserver 192.168.65.2
options ndots:0

192.168.65.2 is host.k3d.internal and it's mean host docker machine.

@iwilltry42 iwilltry42 added this to the Backlog milestone Mar 22, 2022
@iwilltry42
Copy link
Member

Hi @heesuk-ahn , sorry for the late feedback and thanks for opening this issue!

Also thanks for providing your solution as a closing comment :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants