Add a zone to CoreDNS
To add your own zone to the CoreDNS configuration in a cluster, use ConfigMap.
-
Create a manifest for ConfigMap. Specify the name
coredns-customand the namespacekube-system. The name of the file that is created through ConfigMap must end with the.custompostfix . Example manifest:apiVersion: v1kind: ConfigMapmetadata:name: coredns-customnamespace: kube-systemdata:test.custom: |example.com:53 {whoami} -
Restart the CoreDNS pods:
kubectl delete po -n kube-system -l k8s-app=kube-dns