Skip to main content
Account

CoreDNS

CoreDNS is a Go DNS server and the default Kubernetes cluster DNS. Learn how the Corefile plugin chain handles service discovery and forwarding.

Status
Stable
Category
Orchestration & Management
Subcategory
Coordination & Service Discovery
License
Apache-2.0
Technology matrix Adopt Production ready See the matrix

CoreDNS is a DNS server written in Go that has been the default cluster DNS for Kubernetes since 1.13, replacing kube-dns. Inside a Kubernetes cluster it resolves my-svc.my-namespace.svc.cluster.local to Service ClusterIPs, handles Pod A records, and forwards everything else upstream.

Its defining feature is the plugin chain. CoreDNS is built on the same Caddy core as the Caddy web server, and every feature — zone files, caching, Kubernetes service discovery, Prometheus metrics, rewrites, DNS-over-TLS — is a plugin compiled into the binary and composed via a Corefile. A query walks through the chain until a plugin answers it. The order in the Corefile matters, and swapping plugins in or out is a recompile (go build with a plugin list) rather than a dynamic load, which keeps the runtime small and predictable.

Beyond Kubernetes, CoreDNS is used as an authoritative and recursive DNS server in its own right, with backends for etcd, Consul, file-based zones, and external plugins for Redis, route53, and more. It’s a CNCF graduated project and, in practical terms, the de-facto DNS server of the cloud-native world — if you’re running Kubernetes, you’re running CoreDNS.

CoreDNS recordings

22 recordings, newest first

Coordination & Service Discovery

Email signup loads here. You can also manage email preferences in account settings.

Build CoreDNS? I'll show you where engineers get stuck with it → Back free content for the community →