Service Types: ClusterIP, NodePort, and LoadBalancer
ClusterIP, NodePort, and LoadBalancer are additive layers. How each works, when to use it, and gotchas that trip up CKA candidates.
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.
Enroll to read the rest of this lesson
Free. Your progress and certificate come with it.
Enroll, free