KubeDojo

Service Types: ClusterIP, NodePort, and LoadBalancer

AK
by Alexis Kinsella··14 min read
Service Types: ClusterIP, NodePort, and LoadBalancer

Your Pod has an IP. So do all the other Pods in the same Deployment. But the moment you scale up, restart, or roll out a new image, those IPs change. Anything that hardcoded the old IP is now broken. Services solve this — not with DNS tricks, but with a stable virtual IP that kube-proxy keeps current on every node in the cluster.

Services are one of the oldest and most stable APIs in Kubernetes. The design is sound: a selector matches a set of Pods, the EndpointSlice controller tracks which ones are ready, and kube-proxy programs the kernel so traffic to the ClusterIP reaches a live Pod. No application change required. The three public types — ClusterIP, NodePort, LoadBalancer — are additive layers, not separate systems.

Sign in to access this lesson

Create a free account or sign in to enroll in the CKA — Certified Kubernetes Administrator course and access all 63 lessons.

CKA — Certified Kubernetes Administrator

63 lessons

Browse the full course curriculum →