A Kubernetes Service is a stable network endpoint that exposes one or more pods and routes traffic to them inside or outside a Kubernetes cluster. In practical terms, it gives your application a consistent DNS name and virtual IP address, even when the backing pods are created, deleted, rescheduled, or replaced during deployments.
Services solve a core Kubernetes networking problem: pods are temporary, and their IP addresses change. Instead of sending traffic directly to pod IPs, other workloads send traffic to a Service. Kubernetes then forwards that traffic to healthy matching pods.
app=api.api.default.svc.cluster.local.A Service usually uses a label selector to find the pods it should send traffic to. For example, if your backend pods have the label app=backend, the Service can select those pods and route traffic to them.
Kubernetes tracks the matching pods through EndpointSlices. These EndpointSlices store the pod IPs and ports that currently back the Service. When pods scale up, fail, or move to another node, Kubernetes updates the endpoints automatically.
Inside the cluster, kube-proxy or an equivalent networking component programs routing rules so traffic to the Service IP reaches one of the available pods. In many modern clusters, this behavior may be implemented with iptables, IPVS, or eBPF-based networking depending on the cluster setup.
Assume you run an API with three pod replicas:
api-7c9f9d5b6f-a1api-7c9f9d5b6f-b2api-7c9f9d5b6f-c3Each pod has its own IP address, and those IPs can change during rolling updates. Instead of having a frontend call those pod IPs directly, you create a Service named api. The frontend sends requests to http://api:8080, and Kubernetes sends each request to one of the healthy API pods.
If you deploy a new version and Kubernetes replaces all three pods, the frontend does not need to change. The Service keeps the same name and IP, while the endpoints behind it update.
ClusterIP or LoadBalancer.TCP, but UDP and SCTP are also supported.apiVersion: v1
kind: Service
metadata:
name: api
spec:
type: ClusterIP
selector:
app: api
ports:
- port: 80
targetPort: 8080
protocol: TCP
In this example, other workloads can call the Service on port 80. Kubernetes forwards the traffic to port 8080 on pods labeled app=api.
ClusterIP Service.LoadBalancer Service.LoadBalancer Services.A Kubernetes Service operates at the cluster networking level and exposes pods through a stable endpoint. An Ingress manages HTTP and HTTPS routing rules, usually for traffic entering the cluster from outside.
For example, you might use:
ClusterIP Service for your internal api workload.api.example.com that routes external HTTPS traffic to that Service.LoadBalancer Service to expose the Ingress controller itself to the internet.A Deployment manages pods and updates them over time. A Service gives those pods a stable network identity.
In most application setups, you use both. The Deployment defines how many replicas should run and which container image to use. The Service defines how other workloads reach those replicas.
LoadBalancer Service can request a cloud load balancer on managed platforms such as EKS, AKS, and GKE.In production Kubernetes environments, Services usually sit between application workloads, ingress controllers, service meshes, and cloud networking. For example, a data platform running Airflow on EKS may expose webserver and worker-related components with Services as part of the cluster design. You can see this pattern in a practical guide to deploying Apache Airflow on AWS EKS.
The same Service concepts apply across managed Kubernetes platforms. On Azure, for example, teams running Azure Kubernetes Service still use Service objects for internal endpoints and cloud-backed load balancers.
Services also work well with infrastructure automation patterns. If you manage cloud resources from Kubernetes, tools such as Crossplane can define related infrastructure while Kubernetes Services expose the workloads that consume it. For example, you can combine application manifests with cloud resource provisioning using Crossplane on Kubernetes.
Use a Kubernetes Service when pods need a stable way to receive traffic. If the caller is inside the cluster, start with ClusterIP. If you need external access, use LoadBalancer directly or place an Ingress or Gateway in front of a Service.
For most teams, the Service is one of the basic building blocks of Kubernetes application delivery. It keeps networking predictable while pods remain dynamic.