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

Kubectl graph fails to resolve DNS names behind a VPN #3

Closed
steveteuber opened this issue Aug 20, 2020 · 2 comments
Closed

Kubectl graph fails to resolve DNS names behind a VPN #3

steveteuber opened this issue Aug 20, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@steveteuber
Copy link
Owner

steveteuber commented Aug 20, 2020

When a VPN is being used then DNS lookups will fail:

$ GODEBUG=netdns=2 kubectl graph pods
go package net: built with netgo build tag; using Go's DNS resolver
go package net: hostLookupOrder(kubernetes.vpn.example.com) = files,dns
Unable to connect to the server: dial tcp: lookup kubernetes.vpn.example.com on X.X.X.X:53: no such host

For comparison, kubectl installed via homebrew is using the regular C resolution process:

$ GODEBUG=netdns=2 kubectl get pods
go package net: using cgo DNS resolver
go package net: hostLookupOrder(kubernetes.vpn.example.com) = cgo
NAME                             READY   STATUS    RESTARTS   AGE
example-application-77b7568d4b-csbnc   1/1     Running   0          6d5h
example-application-77b7568d4b-tl9v6   1/1     Running   0          6d5h
example-application-77b7568d4b-vsbtq   1/1     Running   0          6d5h
@steveteuber
Copy link
Owner Author

A solution already implemented in kubectl: kubernetes/release#469

@steveteuber steveteuber added the bug Something isn't working label Aug 20, 2020
@steveteuber
Copy link
Owner Author

In my opinion, the only valid solution is to build the binary for macOS with CGO_ENABLED=1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant