Prerequisites: service

A service is a stable front, but something has to track which real pods are actually behind it right now. That something is the EndpointSlice: a list of the healthy pod addresses matching a Service’s selector, kept current by a controller as pods come and go.

Look at the one behind Grafana on devata:

kubectl get endpointslices -n monitoring -l kubernetes.io/service-name=kps-grafana -o wide
kubectl get pods -n monitoring -o wide | grep -i grafana

The addresses in the EndpointSlice match the Grafana pod’s address. That is the indirection that makes a Service worth having: the clusterip out front never changes, while this list behind it updates every time a pod is rescheduled to a new address. When you expose a Deployment, this is the object Kubernetes creates to record where traffic should land, and it is what kube-proxy or cilium reads to know the set of backends to route to.

Reference: EndpointSlices.