ExternalDNS synchronizes exposed Kubernetes Services and Ingresses with DNS providers. Inspired by Kubernetes DNS,…
ExternalDNS synchronizes exposed Kubernetes Services and Ingresses with DNS providers. Inspired by Kubernetes DNS, Kubernetes’ cluster-internal DNS server, ExternalDNS makes Kubernetes resources discoverable via public DNS servers. Like KubeDNS, it retrieves a list of resources (Services, Ingresses, etc.) from the Kubernetes API to determine a desired list of DNS records. Unlike KubeDNS, however, it’s not a DNS server itself, but merely configures other DNS providers accordingly—e.g. AWS Route 53 or Google CloudDNS.
In a broader sense, ExternalDNS allows you to control DNS records dynamically via Kubernetes resources in a DNS provider-agnostic way.
The FAQ contains additional information and addresses several questions about key concepts of ExternalDNS.
ExternalDNS’ current release is v0.5. This version allows you to keep selected zones (via –domain-filter) synchronized with Ingresses and Services of type=LoadBalancer in various cloud providers:
From this release, ExternalDNS can become aware of the records it is managing (enabled via –registry=txt), therefore ExternalDNS can safely manage non-empty hosted zones. We strongly encourage you to use v0.5 (or greater) with –registry=txt enabled and –txt-owner-id set to a unique value that doesn’t change for the lifetime of your cluster. You might also want to run ExternalDNS in a dry run mode (–dry-run flag) to see the changes to be submitted to your DNS Provider API.
Make sure you have the following prerequisites:
You’ve probably created many deployments. Typically, you expose your deployment to the Internet by creating a Service with type=LoadBalancer. Depending on your environment, this usually assigns a random publicly available endpoint to your service that you can access from anywhere in the world.
But dealing with IPs for service discovery isn’t nice, so you register this IP with your DNS provider under a better name—most likely, one that corresponds to your server name. If the IP changes, you update the DNS record accordingly.
Those times are over! ExternalDNS takes care of that last step for you by keeping your DNS records synchronized with your external entry points.
ExternalDNS’ usefulness also becomes clear when you use Ingresses to allow external traffic into your cluster. Via Ingress, you can tell Kubernetes to route traffic to different services based on certain HTTP request attributes.
But there’s nothing that actually makes clients resolve those hostnames to the Ingress’ IP address. Again, you normally have to register each entry with your DNS provider.
This is a Kubernetes Incubator project. The project was established 2017-Feb-9 (initial announcement here). The incubator team for the project is:
Tell us about a new Kubernetes application
Never miss a thing! Sign up for our newsletter to stay updated.
Discover and learn about everything Kubernetes