How to force DNS over TCP for an OpenShift Pod
Issue
OpenShift sends DNS requests using UDP by default. In unreliable networks, these requests may be lost and will require 5 seconds for the DNS retry timeout to resend the request.
If the result from this DNS request is required for an additional service call, the 5-second timeout can cause the service request to fail.
To make DNS requests more reliable, the TCP protocol can be used to potentially speed up recovery from lost packets.
Environment
- OpenShift 4.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.