Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nicolai86/dc9bc4129aeb01b1758cad32680f4b46 to your computer and use it in GitHub Desktop.
Save nicolai86/dc9bc4129aeb01b1758cad32680f4b46 to your computer and use it in GitHub Desktop.
golang, kubernetes dns
the problem:
a golang binary inside a container inside a vm on osx can't resolve a hostname:
```
dial tcp: lookup "…": no such host
```
switching to the cgo resolver via GODEBUG=netdns=cgo results in the same problem.
the hostname can be found on the VM, confirmed via `dig`
the hostname can be found inside the container, confirmed via `dig`
only the running go-binary can't resolve the hostname
running the container directly results in a working binary.
ideas?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment