DNS and Service Discovery
Understand how Pods find each other using Kubernetes built-in DNS, and how Service discovery works under the hood.
The Service Discovery Problem
Pods come and go, and their IPs change constantly. Hardcoding IPs would break instantly. Kubernetes solves this with DNS-based service discovery.
Instead of an IP, you talk to a stable name.
Cluster DNS
Every cluster runs a DNS service (usually CoreDNS). It automatically creates DNS records for Services and Pods, so names resolve to the right ClusterIP.