Interview Prep/Kubernetes/Services, Networking, Ingress & Gateway API

What is a Kubernetes Service and why do we need one?

BeginnerConceptServices, Networking, Ingress & Gateway API
Answer

Pod IPs change every time a Pod is replaced, so clients need a stable virtual IP and DNS name. A Service selects Pods by label and gives them a stable ClusterIP; kube-proxy (or eBPF) load-balances connections across ready endpoints.

kubectl expose deploy web --port=80 --target-port=8080
kubectl get endpointslices -l kubernetes.io/service-name=web
All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Services, Networking, Ingress & Gateway API