Created attachment 1422703 [details]
Description of problem:
dns quires send out to tun0 interface when curl $svc_name form pods
Version-Release number of selected component (if applicable):
Steps to Reproduce:
## In the master:
[root@host-172-16-120-135 dnsmasq.d]# oc get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE
blue-pod-1 1/1 Running 0 3h 10.129.0.16 172.16.120.10
red-pod-1 1/1 Running 0 3h 10.129.0.17 172.16.120.10
[root@host-172-16-120-135 dnsmasq.d]# oc rsh blue-pod-1
/ # cat /etc/resolv.conf
search p1.svc.cluster.local svc.cluster.local cluster.local openstacklocal
/ # curl red-service.p1.svc.cluster.local.:8080
Hello Red Pod-1 Example
DNS query packets captured in tun0 interface by: tcpdump -nvvvS -i tun0 port 53
Should not see DNS query packets in tun0 interface
Captured dns packets is attached.
I'm not sure why you think the query should not come out tun0... The query is resolved by the node, so when the pod tries to do the lookup it is handled by the dnsmasq running on the node.
Perhaps I'm missing something, but this sounds correct to me.