Search code examples
kuberneteskubernetes-helmcoredns

How to configure coredns Corefile similar to unbound configurations?


Is there a possibility to configure all the unbound configurations listed here similarly in kubernetes coredns 'Corefile' configuration like this. Only few options are listed here. I am looking for the below server options in unbound conf to be done on kubernetes Corefile coredns configmap.

  1. do-ip6
  2. verbosity
  3. outgoing-port-avoid, outgoing-port-permit
  4. domain-insecure
  5. access-control
  6. local-zone

I need to do above configurations similarly in kubernetes Corefile configuration. As I am new to kubernetes coredns, I am not sure whether these configurations are possible in Coredns. Can someone direct me how to do that? Also I am looking for steps on how to configure this in Corefile configmap using helm. It would be really helpful if I get some information on this. Thanks in advance!!!


Solution

  • CoreDNS supports some requested features via plugins:

    • do-ip6 - CoreDNS works with ipv6 by default (if cluster is dual-stack)
    • verbosity - log plugin will show more details about queries, it can have different format and what it shows (success, denial, errors, everything)
    • outgoing-port-avoid, outgoing-port-permit - did not find any support of this
    • domain-insecure - please check if dnssec can help (It looks similar to what unbound has, but I'm not really familiar with it).
    • access-control - acl plugin does it.
    • local-zone - local plugin can be tried for this purpose, it doesn't have lots of options though.

    Bonus point:

    • CoreDNS config's change - reload allows automatic reload of a changed Corefile.

    All mentioned above plugins have syntax and examples on their pages.