Does anyone know how to interpret the configuration of coredns? as you can see, . . .

Ryan Lyu:
Does anyone know how to interpret the configuration of coredns?

as you can see, the first domain is kubernetes, but why the answer to this question is cluster.local?


Aneek Bera:
Corefile consists of a number of plugins, plugins are configured for error handling, reporting health, monitoring metrics, cache etc.

The plugin that makes coreDNS to work with kubernetes is kubernetes plugin. In kubernetes plugin, top level domain of kubernetes cluster is set (cluster.local)

Aneek Bera:
Using the kubernetes plugin, CoreDNS will read zone data from a Kubernetes cluster. It implements the https://github.com/kubernetes/dns/blob/master/docs/specification.md|spec defined for Kubernetes DNS-Based service discovery
Format:

Kubernetes ZONE {
pods POD-MODE
           fallthrough ZONE
           ttl time_in_sec

kubernetes plugin block:

kubernetes cluster.local in-addr.arpa ip6.arpa {
           pods insecure
           fallthrough in-addr.arpa ip6.arpa
           ttl 30

Aneek Bera:
Check out the plugins here:
https://coredns.io/plugins/kubernetes/

Ryan Lyu:
Thanks for answering my question. It really helps!

:+1::+1::+1::+1::+1: