liveBook · Manning

DNS server

As explained in Kubernetes in Action, Second Edition

A DNS server resolves domain names into network addresses and other DNS records.

A DNS server translates service names into network addresses. In Kubernetes, pods typically use an internal DNS server so applications can reach Services by name instead of hard-coding cluster IP addresses. section 11.1.3

Kubernetes DNS name resolution supports several practical forms:

  • Use the Service name, such as http://quiz, when the Service is in the same namespace. section 11.1.3
  • Append the namespace for cross-namespace access, such as http://quiz.kiada. section 11.1.3
  • Use longer names such as quiz.kiada.svc or quiz.kiada.svc.cluster.local; cluster.local is the default suffix but can be changed. section 11.1.3

Calling Services by name

A pod can configure an application with QUOTE_URL=http://quote/quote and QUIZ_URL=http://quiz. The application then connects through Kubernetes Services while DNS resolves those names to Service cluster IP addresses. section 11.1.3

How Kubernetes in Action, Second Edition covers it

How deep it goes
Explains same- and cross-namespace names, DNS suffixes, and pod resolver configuration, but does not detail DNS server internals.
Examples
Uses quiz and quote Service URLs, kubectl output, and a pod’s /etc/resolv.conf to demonstrate name resolution.
What it assumes
Assumes basic pods and Services, while introducing namespace-qualified names and internal resolver configuration.
What you can do after
Apply DNS through Kubernetes Service names and configure applications with stable internal URLs.
How it connects
Connects DNS servers with Kubernetes Services, pods, namespaces, CoreDNS, kube-dns, and cluster IP addresses.

Also explained in

Compare how 2 books explain DNS server →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes in Action, Second Edition. The section links point to the parts of the book it draws on.