CoreDNS 1.0: General Availability for Kubernetes Service Discovery

Table of Contents
Introduction
On December 19, 2017, the CoreDNS team announced CoreDNS 1.0, declaring the flexible DNS server production-ready. After a year of rapid iteration, CoreDNS reached feature parity with kube-dns while offering a modular plugin system that meshes perfectly with Kubernetes’ dynamic environments.
GA Highlights
- Stable Kubernetes Plugin: Serves
cluster.localzones with endpoint slices, headless services and pod-level records, matching kube-dns behavior. - Plugin Chain Improvements: Plugins compile into a single binary; the 1.0 release adds
retry,loopdetection and smarter health checks. - Dynamic Configuration Reload:
coredns -confreloads Corefiles without restarts, simplifying changes in production clusters. - Metrics & Tracing: Prometheus metrics and OpenTracing hooks graduate from beta, offering deep observability.
- Forwarding Enhancements: Improved caching, parallel upstream queries and
autoplugin for on-demand zone loading.
Migrating from kube-dns
Install the official CoreDNS deployment:
kubectl apply -f coredns.yamlUpdate the
kubelet--cluster-dnsflag to point at the CoreDNS service ClusterIP.Validate headless services and stub domains using
kubectl exec+dig.Remove the old kube-dns deployment after confirming workloads resolve successfully.
Sample Corefile:
cluster.local:53 {
errors
health
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
fallthrough in-addr.arpa ip6.arpa
}
prometheus 0.0.0.0:9153
cache 30
loop
reload
loadbalance
}
.:53 {
errors
cache 30
forward . 8.8.8.8 1.1.1.1
log
}
Managing the Corefile via ConfigMap
The CoreDNS deployment consumes a ConfigMap named coredns in kube-system. Update it declaratively:
kubectl -n kube-system edit configmap coredns
or with GitOps:
apiVersion: v1
kind: ConfigMap
metadata:
name: coredns
namespace: kube-system
data:
Corefile: |
cluster.local:53 {
errors
health
kubernetes cluster.local in-addr.arpa ip6.arpa
prometheus :9153
cache 30
loop
reload
}
.:53 {
forward . 8.8.8.8 1.1.1.1
log
}
Apply with kubectl apply -f corefile-config.yaml to keep DNS configuration under version control.
Operational Tips
- Scale CoreDNS horizontally—most clusters run 2–4 replicas behind a
ClusterIPservice. - Monitor
coredns_dns_request_duration_secondsandcoredns_dns_response_rcode_count_totalmetrics to spot latency or NXDOMAIN spikes. - Use
plugins.cfgto build minimal binaries for constrained environments; 1.0 tooling makes plugin selection straightforward. - Pair with Kubernetes’ ConfigMap-based Corefile to manage DNS settings declaratively.
Common DNS Gotchas (That Look Like App Bugs)
- Watch for forwarding loops: if CoreDNS forwards to a resolver that forwards back into the cluster, you’ll see
loopwarnings and intermittent resolution failures. - Be conservative with upstream resolvers; public DNS IPs are convenient for demos, but production clusters usually forward to VPC/on-prem resolvers for reliability and policy.
- When debugging, check from inside a pod (
kubectl exec ... -- dig) so you’re seeing the same DNS path and search domains that the workload sees.
Looking Ahead
The 2018 roadmap includes:
- Dual-Stack Support for IPv6/IPv4 clusters.
- Dynamic upstream discovery via Kubernetes Endpoints.
- Advanced policies like response rewriting for service mesh domains (e.g., Istio
globalsuffixes).
CoreDNS 1.0 laid the groundwork for its 2018 promotion to Kubernetes DNS default, giving operators a fast, extensible DNS choice.
Summary
| Aspect | Details |
|---|---|
| Release Date | December 19, 2017 |
| Key Innovations | GA Kubernetes plugin, hot reload, observability, enhanced forwarding |
| Significance | Positioned CoreDNS as the next-generation DNS provider for Kubernetes clusters |