Add a zone to CoreDNS
Add a zone to CoreDNS
To add your own zone in a CoreDNS configuration in a cluster use ConfigMap.
-
Create a manifest for ConfigMap. Specify the name
coredns-custom
and namespacekube-system
. The name of the file that is created via ConfigMap must end with a postfix.custom
. Example manifesto:apiVersion: v1
kind: ConfigMap
metadata:
name: coredns-custom
namespace: kube-system
data:
test.custom: |
example.com:53 {
whoami
} -
Restart the CoreDNS pods:
kubectl delete po -n kube-system -l k8s-app=kube-dns