Why Kubernetes ?

Why Kubernetes ?

The need of Kubernetes in the current world.

ยท

3 min read

The Monolithic Legacy

Monolithic apps are the ones in which all the components are tightly coupled as they are developed and deployed as a single unit and run as a single OS process. But in case of a hardware failure, the ops team has to manually shift it to another server. As the number of components increases it becomes fairly complex to manage them as a single unit. One of the difficult tasks is to separate the components which use different versions of the same package. Also scaling the application was an issue, in case a component is not scalable (ex-relational db) the whole app becomes unscalable.

Microservices

We started splitting those components in the monolithic architecture into separate microservices which can communicate through APIs. These microservices can be developed and deployed individually and changing one microservice does not affect another. Now the problem of scaling the system is also resolved as these components can be scaled individually. But in the case of a large number of microservices, the overall complexity increases. Also if the microservice is large enough then it would be great to deploy it on a separate VM but in the case of smaller microservices, it would lead to the wastage of hardware resources. Moreover, these VMs need to be configured and managed individually which would cause more load on the ops team.

The Rise of Containers

Container technologies allow us to run different services on the host machine not only providing a different environment for each of them but also isolating them from each other just like VMs but with much less overhead. Compared to VMs, containers are much more lightweight, which allows you to run higher numbers of software components on the same hardware.

On the left we have VM type architecture, on the right we have container type architecture

Whenever an instruction is given to a VM the instruction goes from VM to the Hypervisor (if it is a type-2 hypervisor) and then it is executed by the host. In case of containers the instruction given to the container is directly executed by the host but in an isolated manner. Some of the popular container technologies are Docker, rkt, fargate etc. But one of the problems that we have seen is still not addressed and that is the ability to deploy and manage the whole system in case of a complex application with multiple components. Here Kubernetes comes to the rescue.

Kubernetes

Kubernetes is a software system that allows us to easily deploy and manage our containerized applications. Kubernetes relies on the Linux Containerization technology as these containers are isolated from each other which becomes critical when we are running applications for two different organizations on the same machine. Kubernetes allows us to run our containers on thousands of computer nodes as if all those nodes were a single, enormous computer. Deploying the containers would be the same whether our cluster has a couple of nodes or thousands of nodes. The developer can specify that certain apps must run together and Kubernetes will deploy them on the same worker node. Moreover, Kubernetes also includes services like scaling, load balancing, disaster recovery etc. Kubernetes can relocate the app at any time, and by mixing and matching apps, achieve far better
resource utilization than is possible with manual scheduling.

Signing off ๐Ÿ‘‹

If you like this blog, please give it a like and follow it. Also, you can connect with me on my socials. This is Dhairya Arora signing off until then keep learning!

Did you find this article valuable?

Support Dhairya Arora by becoming a sponsor. Any amount is appreciated!

ย