Adding Custom Zones to CoreDNS

To add your own zone in the CoreDNS configuration in the cluster, add a configmap with the coredns-custom name to the kube-system namespace.

The file name created by configmap must end with the .custom postfix, for example:

apiVersion: v1
kind: ConfigMap
  name: coredns-custom
  namespace: kube-system
  test.custom: | # test.custom --- name, must end with the .custom postfix {

After that, restart the coredns pods by running the following command:

kubectl delete po -n kube-system -l k8s-app=kube-dns