I run dnsmasq in a kubernetes pod with some forwarding rules that include some 
kubernetes service IPs (172.31.*).  In a recent kubernetes update, it seems 
that kubernetes configures all of those service addresses as IPVS interfaces in 
the pod, and I believe dnsmasq is not ignoring those forwarding rules because 
it believes they are all local interfaces.  Is there a way to force dnsmasq to 
use the nameservers?

my config:

  dnsmasqconf: |

    # dnsmasq.conf file from ConfigMap

    no-resolv

    no-hosts

    server=/in-addr.arpa/169.254.169.254

    server=/ip6.arpa/169.254.169.254

    server=/k8s.internal/172.31.53.53

    server=/internal.domain/127.0.0.1#10053

    server=/other.domain/172.31.217.188

    # Upstream based on environment (OpenStack or BMC)

    # Must be provided via environment variable

    server=169.254.169.254

    user=root

    conf-dir=/etc/dnsmasq.d

 

logs from dnsmasq show it is ignoring the 172.* addresses:  dnsmasq - INFO 1 
140344933922560 1000 - - dnsmasq[14]: ignoring nameserver 172.31.217.188 - 
local interface

 

After looking in the pod, I noticed those addresses actually show up in 'ip 
addr' output:

 

[oracle@ost-ugbu-dataraker-node21x4 app]$ ip addr | grep 172.31.217.188

    inet 172.31.217.188/32 brd 172.31.217.188 scope global kube-ipvs0

 

My assumption is that this is why dnsmasq thinks the interface is local and is 
ignoring it.  I notice that the internal.domain forwarded to 127.0.0.1 on port 
10053 is not ignored, is it because it's a non-standard port?  Or can I force 
this if I just specify #53?

 

Thanks,
Jon
_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to