Add Custom CoreDNS Configuration

It is desirable to extend CoreDNS with additional configuration to make changes that survive control plane maintenance. It is possible to create a ConfigMap in the kube-system namespace. The ConfigMap must be named coredns-additional-conf and contain a data entry with the key extra.conf. The value of the entry must be a string containing the additional configuration.

The following example shows how to add a custom DNS entry for example.abc:

apiVersion:v1kind:ConfigMapmetadata:name:coredns-additional-confnamespace:kube-systemdata:extra.conf:| example.abc:53 { hosts { 1.2.3.4 example.abc 2.3.4.5 server.example.abc fallthrough } }

Last updated

Was this helpful?

close