This article can be used to find out the cause how latency happened
Symptoms: Packets latency seen when pods communicate to coredns
Environment
VMware NSX-T Data Center 2.5.x VMware NSX-T Data Center
Cause
1: Get Src Pod id kubectl get pod
2: Get the tag (Privated vlan) that Pod is using ovs-vsctl show
3: Get the switchport that Pod is using net-stats -l
4: Do packet capture on this switchport pktcap-uw --switchport --dir 2 -o pod.pcap
5: Example Packet analysis The Src Pod did not send AAAA DNS query only A DNS query send the first time. and after 5 seconds, it sent A and AAAA DNS query.
Resolution
Issue is not caused by nsx network
Workaround: Add options in Pod resolv.conf echo 'options single-request-reopen' >>/etc/resolv.conf
Additional Information
Impact/Risks: 5 Seconds latency when pods accessing coredns