liveBook · Manning

Fully qualified domain name

As explained in Acing the Certified Kubernetes Administrator Exam, Second Edition

A fully qualified domain name is a complete DNS name that uniquely identifies a host or service within the DNS hierarchy.

A fully qualified domain name (FQDN) is a complete DNS name that identifies a Kubernetes Service or Pod within the cluster hierarchy. Service names follow <service-name>.<namespace-name>.svc.cluster.local. section 6.2.4

Use the appropriate name when resolving Kubernetes workloads:

  • Use a Service FQDN such as apache-svc.default.svc.cluster.local when the target Service is in another namespace. section 6.2.4
  • Use a Pod FQDN such as 10-244-0-14.default.pod.cluster.local; CoreDNS changes the Pod IP dots to dashes. section 6.2.4
  • Short names depend on the pod's DNS search domains, which are listed in /etc/resolv.conf. section 6.2.4

Verify cross-namespace resolution

From a shell inside a pod, curl apache-svc may fail when the Service is elsewhere, while curl apache-svc.default succeeds. Inspect /etc/resolv.conf to check search domains and the CoreDNS nameserver. section 6.2.4 section 6.8

root@nginx-76d6c9b8c-8lqgg:/# cat /etc/resolv.conf
search c01383.svc.cluster.local svc.cluster.local cluster.local
nameserver 100.96.0.10
options ndots:5

Inspect a representative pod resolver configuration showing namespace-specific search domains and the cluster DNS server. section 6.2.4

How Acing the Certified Kubernetes Administrator Exam, Second Edition covers it

How deep it goes
Explains Service and Pod naming formats, search domains, and resolver verification, but stops short of DNS internals.
Examples
Uses apache-svc.default, apache-svc.default.svc.cluster.local, a Pod IP-based FQDN, curl, and /etc/resolv.conf.
What it assumes
Assumes basic Pods, Services, namespaces, and shell access while teaching Kubernetes DNS naming from operational examples.
What you can do after
Diagnose cross-namespace hostname failures by testing qualified names and inspecting a pod's DNS resolver configuration.
How it connects
Connects DNS resolution with CoreDNS, Kubernetes Service, Pod, namespace, kubelet, and /etc/resolv.conf.

Also explained in

Compare how 2 books explain fully qualified domain name →

Related concepts

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