I have been learning more about Kubernetes recently, and one thing that helped me understand it better is that Kubernetes is not just about running containers.
At first, I was mostly thinking like this:
Application -> Docker image -> Pod -> Deployment
But Kubernetes is more about defining what state you want your system to be in.
For example, we can say:
- I want 3 instances of my application
- I want this application to be accessible through a service
- I want some configs and secrets available to it
- I want Kubernetes to restart it if something goes wrong
Kubernetes controllers keep checking the current state and try to make it match the state we defined.
This also makes Kubernetes very extensible.
Using CRDs and operators, we can create our own resources and build higher level abstractions on top of Kubernetes.
For example, instead of developers creating deployments, services, configmaps and other resources separately, we can define something like:
ApplicationRelease: 1.2.3
and let the controller create and manage everything needed for that application.
I am currently exploring more around this idea of using Kubernetes not just for deploying applications, but also for building platforms on top of it.
Will keep sharing what I learn around Kubernetes, Java, Spring Boot and distributed systems.
Top comments (1)
Informative and insightful!