Architecture Template: CoreDNS Debug ConfigMap
A production-ready CoreDNS configuration with logging, caching, and health checks for debugging DNS issues.
When to use this template:
Setting up CoreDNS for a new cluster
Debugging intermittent DNS failures
Enabling DNS query logging temporarily
Optimizing DNS performance with caching
Template 1: Production CoreDNS ConfigMap
This replaces the default CoreDNS Corefile with production-ready settings.
apiVersion: v1
kind: ConfigMap
metadata:
name: coredns
namespace: kube-system
data:
Corefile: |
.:53 {
errors
health {
lameduck 5s
}
ready
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
fallthrough in-addr.arpa ip6.arpa
ttl 30
}
prometheus :9153
forward . /etc/resolv.conf {
max_concurrent 1000
}
cache 30 {
success 9984 30
denial 9984 5
}
loop
reload
loadbalance
}



