diff --git a/contributors/design-proposals/network/coredns.md b/contributors/design-proposals/network/coredns.md new file mode 100644 index 00000000000..1100801b1d0 --- /dev/null +++ b/contributors/design-proposals/network/coredns.md @@ -0,0 +1,58 @@ +# Add CoreDNS for DNS-based Service Discovery + +Status: Pending + +Version: Alpha + +Implementation Owner: @johnbelamaric + +## Motivation + +CoreDNS is another CNCF project and is the successor to SkyDNS, which kube-dns is based on. It is a flexible, extensible +authoritative DNS server and we have built a direct integration to the Kubernetes API. It can serve as cluster DNS, +complying with the [dns spec](https://github.com/kubernetes/dns/blob/master/docs/specification.md). + +CoreDNS has fewer moving parts than kube-dns, since it is a single executable and single process. It is written in Go so +it is memory-safe (kube-dns includes dnsmasq which is not). It supports a number of use cases that kube-dns does not +(see below). As a general-purpose authoritative DNS server it has a lot of functionality that kube-dns could not reasonably +be expected to add. See, for example, the [intro](https://docs.google.com/presentation/d/1v6Coq1JRlqZ8rQ6bv0Tg0usSictmnN9U80g8WKxiOjQ/edit#slide=id.g249092e088_0_181) or [coredns.io](https://coredns.io) or the [CNCF webinar](https://youtu.be/dz9S7R8r5gw). + +## Proposal + +The proposed solution is to enable the selection of CoreDNS as an alternate to Kube-DNS during cluster deployment, with the +intent to make it the default in the future. + +## User Experience + +### Use Cases + + * Standard DNS-based service discovery + * Federation records + * Stub zone support + * Adding custom DNS entries + * Making an alias for an external name [#39792](https://github.com/kubernetes/kubernetes/issues/39792) + * Dynamically adding services to another domain, without running another server [#55](https://github.com/kubernetes/dns/issues/55) + * Adding an arbitrary entry inside the cluster domain + * Verified pod DNS entries (ensure pod exists in specified namespace) + * Experimental server-side search path to address latency issues [#33554](https://github.com/kubernetes/kubernetes/issues/33554) + * Limit PTR replies to the cluster CIDR [#125](https://github.com/kubernetes/dns/issues/125) + +By default, the user experience would be unchanged. For more advanced uses, existing users would need to modify the +ConfigMap that contains the CoreDNS configuration file. + +## Implementation + +Each distribution project (kubeadm, minikube, kubespray, and others) will implement CoreDNS as an optional +add-on as appropriate for that project. + +### Client/Server Backwards/Forwards compatibility + +No changes to other components are needed. The configuration of the DNS server is done differently, so in +cases where users have customized their DNS configuration, they will need to update it. For example, +if users have configured stub domains, they would need to modify that configuration. + +## Alternatives considered + +Maintain existing kube-dns, add functionality to meet the currently unmet use cases above, and fix underlying issues. +To ensure the user of memory-safe code, this would require replacing dnsmasq with another caching DNS server, +or implementing caching within kube-dns.