Our JVM services (based on Java SE 8/Scala/Finagle) have problems resolving DNS names. I have checked coredns deployment logs in kube-system namespace and found out that java.net.InetAddress.getAllByName() is querying for ANY record type.
If I check name resolution via nslookup I can confirm that ANY record type is not resolvable, but A or AAAA records are:
# kubectl exec -i -t dnsutils -- nslookup -type=a weather.mab.matjazmav.test
Server: 10.96.0.10
Address: 10.96.0.10#53
Name: dev-proxy.default.svc.cluster.local
Address: 10.100.187.185
# kubectl exec -i -t dnsutils -- nslookup -type=any weather.mab.matjazmav.test
Server: 10.96.0.10
Address: 10.96.0.10#53
*** Can't find weather.mab.matjazmav.test: No answer
My question is, how can I make Minikube's CoreDNS respond to ANY query, or how can I force java.net.InetAddress to send A or AAAA query?
EDIT:
It turned out that we used old NS provider that ships with Java SE 8 (sun.net.spi.nameservice.provider.1=dns,sun) see my answer for details.