DELAPARRA
Index
Color
NL
Category: Kubernetes

Service

Explained by Updated

What is Service?

Service: A stable network endpoint in front of a set of Pods. Pods come and go, but the Service gives them one steady virtual IP and DNS name. A Service in Kubernetes gives a group of pods one stable address and DNS name. Pods come and go with new IP addresses, but the Service always routes traffic to whichever matching pods are currently healthy.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Service

How is Service used in practice?

It finds its pods with a label selector, and it only sends traffic to pods that pass their readiness probe. Other applications in the cluster simply connect to the Service name, such as web or mysql.

What should you keep in mind with Service?

The default type, ClusterIP, is internal only. NodePort and LoadBalancer types expose a Service outside the cluster, and an Ingress usually handles HTTP traffic from the internet. If a Service does not respond, check kubectl get endpoints for it. An empty list means no pods match the selector or none of them are ready.

What does an example of Service look like?

apiVersion: v1 kind: Service metadata: name: web spec: selector: { app: web } ports: - port: 80 targetPort: 8080

At a glance

CategoryKubernetes
Explained by
Updated

More Kubernetes terms

All terms starting with S

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.