Kubernetes Services simply visually explained

Kim Wuestkamp
The Startup
Published in
6 min readOct 8, 2019

--

Parts

TL;DR

There are four main services, with ClusterIP being the holy grail:

I would like you to imagine that if you create a NodePort service it also creates a ClusterIP one. And if you create a LoadBalancer it creates a NodePort which then creates a ClusterIP. If you do this, k8s services will be easy. We will walk through this in this article.

Services and Pods

Services point to pods. Services do not point to deployments or replicasets. Services point to pods directly using labels. This gives great flexibility because it doesn’t matter through which various (maybe even customized) ways pods have been created.

We’ll start with a simple example which we extend step by step with different service types to see how those are build on top of each other.

--

--

Kim Wuestkamp
The Startup

killercoda.com | killer.sh (CKS CKA CKAD Simulator) | Software Engineer, Infrastructure Architect, Certified Kubernetes