-
- 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)
Many microservices setups I see today are too tightly coupled. Not making things better in my view when they are done this way. Just moving the pain further.