Contents

Kubernetes CoreDNS

CoreDNS

CoreDNS
CoreDNS is a DNS server.
It is written in Go.
It can be used in a multitude of environments because of its flexibility.

Configuration File Location

1
kubectl -n kube-system describe deploy coredns | grep -C2 -i args
1
2
3
4
5
    Ports:       53/UDP, 53/TCP, 9153/TCP
    Host Ports:  0/UDP, 0/TCP, 0/TCP
    Args:
      -conf
      /etc/coredns/Corefile

Corefile

Corefile
CoreDNS is passing Corefile as a ConfigMap to the PODs of CoreDNS.

Show CoreDNS ConfigMap

1
kubectl -n kube-system describe cm coredns
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Name:         coredns
Namespace:    kube-system
Labels:       <none>
Annotations:  <none>

Data
====
Corefile:
----
.:53 {
    errors
    health {
       lameduck 5s
    }
    ready
    kubernetes cluster.local in-addr.arpa ip6.arpa {
       pods insecure
       fallthrough in-addr.arpa ip6.arpa
       ttl 30
    }
    prometheus :9153
    forward . /etc/resolv.conf {
       max_concurrent 1000
    }
    cache 30
    loop
    reload
    loadbalance
}

Events:  <none>