Kubernetes DNS cheatsheet

Kubernetes DNS

Custom DNS Settings

Edit coredns config map

Add entry to the Corefile: | section of the configmap/coredns in section kube-system.

1.:53 {
2  # ...
3}
4import /etc/coredns/custom/*.server

Add new config map

Example for local DNS server using the clcreative.home zone.

 1apiVersion: v1
 2kind: ConfigMap
 3metadata:
 4  name: coredns-custom
 5  namespace: kube-system
 6data:
 7  clcreative.server: |
 8    clcreative.home:53 {
 9      forward . 10.20.0.10
10    }