Service Discovery

Difficulty: Intermediate

Question

How does service discovery work in Kubernetes?

Answer

Kubernetes uses internal DNS (CoreDNS). Every Service gets a DNS name like `<service>.<namespace>.svc.cluster.local`, which resolves to the Service's ClusterIP.

Concepts covered

CoreDNS, DNS