- All Courses
- Kubernetes for Application Developers
- The Objects You Actually Use
- Services and cluster networking
Services and cluster networking
Pod ip addresses change on every restart, so nothing should ever be configured with one.
Overview
Pods come and go, services do not
Pod ip addresses change on every restart, so nothing should ever be configured with one. A service provides a stable name and address, and load balances across whichever pods currently match its selector.
The types stack: a cluster-internal service is the default, a node port exposes it on every node, and a load balancer asks the cloud provider for an external one. Most application services should stay internal, with an ingress in front.
The selector is the whole binding mechanism. A label typo produces a service with no endpoints, which fails as a connection timeout rather than an obvious error.
In this lesson you will:
- Give a set of pods a stable address
- Compare the service types
- Understand how selectors bind a service to pods
Resources
Notes are not saved yet — they clear when you leave this page.
Pods, ReplicaSets, and Deployments
5m
ConfigMaps and Secrets
17m