net: add configuration knob to force TCP-only DNS requests in the pure Go resolver on unix #29358
There is a DNS resolution bug in Kubernetes (UDP response packets get dropped by conntrack, causing timeouts in DNS queries) : kubernetes/kubernetes#56903
A work-around is to configure the linux resolver to use TCP (e.g. using the
This workaround works with the cgo resolver on glibc-based platforms, but not on musl-based plaforms (e.g. Alpine).
This workaround cannot be used with the pure Go resolver, as it always tries UDP before switching to TCP.
A solution would be to look for the use-vc option in resolv.conf, and switch to TCP when found.
Another solution would be to be able to configure the Go resolver to use TCP, either using the GODEBUG env var (e.g.
The text was updated successfully, but these errors were encountered: