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
?
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
Ryan Lyu:
Thanks for answering my question. It really helps!