One of the main features of Kubernetes is - resource scheduling. It helps you to manage multiple nodes and be able to use their resources to the max. You can ensure you are Not under utilising your node’s resources as it’s costly to pay for the nodes, especially when using lots and lots of nodes. There are other systems too that can do resource scheduling, for example Nomad by Hashicorp company.
I’m completely onboard with you that it’s a lot of things, a lot of abstractions. Infact for me, they seem as complex ones, when abstractions are meant to make life easier. There are a lot of people who will agree with you, and they will tell you how Kubernetes is not the level at which developers should operate at. Only people who maintain infrastructure should be dealing with the nastiness of Kubernetes and Helm and people use more abstractions on top of them to make it easy for developers to deploy their code. For a developer, ideally what they would usually want for their backend services is, be able to
- Push code to their git repo and deploy exactly one of the commits (a release)
- Tell the system how to run the service - running migrations, starting server
- Use an already running DB or some sort of store
- Tell the system how many replicas to run in case of multiple instances for horizontal scaling. Or better, let the system auto scale the service based on some metrics - system metrics like CPU, memory, or business metrics like number of users or application metrics like number of requests
- Tell minimum resources required for the service - CPU, RAM
- Tell the configuration and secrets for the service
- Expose the service to other services, or even the outside world with HTTPS with a domain name
Now if you notice, this is what PaaS provides, for example Heroku and others. Many companies who can shell out money can get these services. When they are scaling and going very high scale and realizing they spend a lot of money on infrastructure, they form infrastructure teams, and use cloud VMs and maintain their own platform as I think they are probably cheaper. So they spend money on paying the salary of these infrastructure teams and the VMs instead of getting PaaS services. Now these infrastructure teams need to manage infrastructure in a cost efficient manner. Which translates to being able to run multiple services or programs on the VMs, and also making sure no one program affects another one as that would be bad. So they need isolation. And they also want to make sure that they use all the resources of all the VMs and if this has to be done manually, they gotta keep checking the resources in each VM manually and then run the program in it. Instead you can use a system to help you. If each program tells the system how much resources (for example CPU, RAM) it needs, then the system can schedule the program to run on a VM which has enough resources to run the program. Sometimes some complex scheduling can happen too, based on scheduling conditions imposed by users - service should run in multiple zones in the cloud. These complex systems like Kubernetes, which orchestrate (schedule) containers using multiple nodes are very handy and are the systems that people use for automatic scheduling. They do have lot of other features too, like health checks and readiness checks, restarting dead services, helping with disk / volume management. Kubernetes is a ton of things actually. It also help with config management, networking, secrets etc. If you take Hashicorp Nomad example, Nomad has lesser features, and uses other tools for other features, for example Consul for networking, config management; Vault for secrets.