CoreDNS subdomain resolution failing with hosts plugin

194 Views Asked by At

We are working on adding Coredns to our setup, and so far it's working fine. Currently we have DNS resolution working with hosts plugin where we are able to add a domain-name in hosts, and it resolves correctly.

But it's not resolving any subdomains correctly, since we want to resolve it to a private-IP via hosts plugin/or any other way.

Is there any workaround for this. We cannot add all the subdomains, since they are more than 100 of them and they keep changing.

Configmap:

In Yaml
  - name: hosts
    configBlock: |-
      10.XXX.XX.XX my-domain.com
      ttl 300
      reload 1m
      fallthrough

In the above case, it works for my-domain.com but doesn't work for subdomain.my-domain.com

In K8s:

      hosts {
        10.XXX.XX.XX my-domain.com
        ttl 300
        reload 1m
        fallthrough
    }

Thanks a lot. :-)

0

There are 0 best solutions below