k8wiz
Kubernetes
Hard
Networking

What does a DNS lookup of a headless Service (clusterIP: None) with a selector return?

Select your answer:

Show answer and explanation

Answer: The IP addresses of the ready pods behind the Service

Explanation

A headless Service gets no cluster IP, so kube-proxy doesn't handle it. CoreDNS answers with an A or AAAA record for each ready endpoint, and the client chooses which pod to connect to. StatefulSets rely on this to give each pod a stable DNS name such as web-0.web.default.svc.cluster.local.