Un Service dà un'identità di rete stabile (un IP virtuale e un nome DNS) a un insieme di Pod selezionati tramite label. Poiché i Pod sono effimeri e cambiano IP, il Service è l'indirizzo durevole che i client usano, e fa load-balancing tra i Pod sani che gli stanno dietro.
Perché esistono i Service
Pods come and go (new IP each time). Clients need a STABLE endpoint.
A Service:
→ selects Pods by label (selector: app=web)
→ gets a fixed virtual IP + DNS name (web.default.svc.cluster.local)
→ load-balances requests across the matching, READY Pods
