-
- source: https://kubernetes.io/
- In order to better understand, let's continue with a story of "Why?"
- Short and simplified interpretation of the history
- Not so long ago...
- It was pretty common to have these large monolithic applications
- Maybe just a Java jar that contained the service and its dependencies?
- And this would be deployed by SSH-ing into the Production virtual machine?
- Creating environments would be a lot of manual work
- Local development environments would be quite different from stage and production environments
- And then Docker was created
- Sometime in this timeline, microservices became a thing
-
- source: https://microservices.io/
- So everyone started splitting their monoliths
- Which meant that instead of having to deploy 1 or 2 Docker container you had to deploy TENS of them
-
- source juggler: http://www.circusberzercus.co.uk/elfic-the-juggler/
- source docker logo: https://www.subpng.com/png-6rhdhk/download.html
-
- What about scaling them differently?
- Enter Kubernetes!
-
- Let's have a look at this again
- I see Kubernetes being composed of logical 2 components
- Master and Workers
- An imperfect analogy
- The Master includes (besides other components)
- Zooming on a Worker (which is basically a VM) - a cluster can have several workers
- When we deploy a service, we tell Kubernetes what is the end state we want (how many instances of the service, how should it be exposed outside the cluster etc.)
- And if it has the resources available, it will make it happen
- One more thing... namespaces
- Pods, services, many Kubernetes resources are organised in namespaces across nodes
- Namespaces provide isolation between the resources in the cluster
- You can assign roles to users and give them access to do specific actions on specific namespaces
- In reality, pods might look more like this when it comes to namespace distribution across nodes
-
- (rectangles are pods of different sizes, colours represent the namespace they are part of)
Well docker was a hit because it addressed that problem, as you state yourself. So we evidently had a problem with tight coupling to a complex “environment “.
I’m thinking about how we ended up here. Longer term perspective. Why have things gotten so complicated? Or haven’t they? Maybe we solved the “environment” problem in the wrong way, and then things just continued in a tangential direction.
It’s a complicated story to go into specifics, but it was a architectural smell to depend on a complex environment. Are as decoupled as we should be today on K8s? Maybe? But did we need all this machinery to solve our essential problems?