Kubernetes Services simply visually explained
Parts
- Part 1: (this article)
- Part 2: Kubernetes Ingress simply visually explained
- Part 3: Kubernetes Istio simply visually explained
- Part 4: Kubernetes Serverless simply visually explained
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.