DNS has existed as long as the internet. Microservices make it hard to manage DNS records at scale because they require an explosion in the use of domain names on an internal data center. Kubernetes standards around DNS for Pods make DNS extremely easy, such that individual applications rarely need to follow complex guidelines for finding downstream services. This is generally enabled by CoreDNS (https://github.com/coredns/coredns), which is at the heart of this chapter.
The job of any DNS server is to map DNS names (like www.google.com) to IP addresses (like 142.250.72.4). There are a few common mappings from DNS servers that we use every day when we browse the web. Let’s look at some of those.
When using Kubernetes, DNS is mostly handled for you, at least in clusters. We still need to define a few terms to contextualize this chapter, however, especially in situations where you might have a custom DNS behavior you care about (for example, with headless services, as seen in this chapter). As for our definitions, at the very least, you’ll want to know about