What is Kubernetes? And Why should you learn it?

Kubernetes is an open-source container orchestration system, released by Google in 2014. The name Kubernetes comes from the Greek language meaning Pilot or Navigator. Kubernetes helps you to automatically manage, scale, and monitor your containerized application. Google developed Kubernetes as an internal product to handle its massive production workloads. Google being a massive tech giant, has to deal with millions of servers, databases, and other services all integrated with each other to serve their end-users. Basically, it’s a massively distributed system with possibly millions of nodes interconnected with each other. As you can imagine managing something like this can be incredibly difficult. If one node crashes, all the other nodes that are dependent on this node can stop functioning as well. This can cause a massive failure across the entire system. Google developed Kubernetes to serve this purpose alone.

In this article, we are going to discuss some of the main features of Kubernetes. We are also going to talk about what Kubernetes can do and what it can’t. Kubernetes has become increasingly popular over the years. Many enterprises are using Kubernetes to manage their container clusters. For any software engineer, having skills in Kubernetes is definitely a plus point.

Before we dive deep into Kubernetes. Let us first try to understand how we handle scaling and automation before the container orchestration system such as Kubernetes became popular.

Scaling and Automation before Kubernetes

Firstly, we have the traditional deployment era. This is during the early stages of the internet. In those times, if you wanted to run an online application you had to run it on an actual physical server sitting in your office or in a datacenter. The server was managed by a single operating system. Although this seemed like a decent approach, there was one major problem. There were no boundaries set for the number of resources each application on the server could utilize. For example, consider a server running multiple applications simultaneously at any point in time. If any of the applications is overloaded, it might utilize a major chunk of resources on the server. This could result in the other applications to underperform as they were limited with very little resources available to function. Scaling such systems is very costly as there always be either overutilization or underutilization of resources. 

In order to tackle this problem virtualization was introduced. Virtualization is a type of technology that allows you to run multiple operating systems or Virtuals machines on a single physical server. When you create a virtual machine you assign it a fixed number of resources. For example, you can limit the RAM to maybe 500mb and CPU to 1 core. You give it an operating system to run and that’s it. Your virtual machine is ready. When you run an application in a virtual machine, the application is unaware of the resources of the actual server. It is only able to access the resources assigned to the virtual machine in which it is running. The application runs in a completely isolated environment and has all the VM resources to itself. This also adds a layer of security as one application running in a VM cannot temper with the information of another application running in a different VM. 

Virtualization gives us a much better way to utilize the resources of a physical server in an efficient manner compared to the traditional approach. Scalability becomes easy as we can add, update, and remove applications easily. The hardware costs are also reduced drastically. Virtualization seems to be a good alternative but still, there are some problems with this approach. You see, a Virtual machine cannot run without an operating system of its own. Although the host server or the physical server has a functioning operating system, the VM still requires an operating system of its own to function. An operating system is a very resource-heavy application. Meaning it takes up a lot of physical resources to operate. When we create a virtual machine and assign resources to it, it is guaranteed that a sizable portion of those resources will be utilized by the operating system. The application that was initially intended to run on this VM will have to work with what’s remaining. Virtualization was a better alternative but not a good one.

A better solution to this problem was containerization. Containerization technology was not something that was developed to solve the problems faced in Virtualization. This technology already exited during the virtualization era but wasn’t as popular. Today Containerization technology is responsible for the smooth operation of big websites that get millions or even billions of visitors a month. Containerization is quite similar to Virtualization. The only difference is containers don’t require an additional operating system to run; they share the same operating system which runs the physical server. The operating system in containers is virtualized. This makes containers very lightweight and portable compared to the VMs.

What can Kubernetes do

Today almost all big enterprises use containerization technology. And it totally makes sense. Containers are portable, lightweight, and overall a good way to bundle and run your applications. When you deploy containers in production, you have to monitor them frequently to avoid any major crashes that might cause your entire system to go down. You also have to immediately restart or deploy a new container if another container crashes. When you have millions of containers running on thousands of servers, managing them manually can get really complicated. This is where Kubernetes comes into the picture. Kubernetes provides you with all the tools to monitor, deploy, and shutdown containers automatically. Kubernetes makes managing massive distributed systems incredibly easy.

Load balancing with Kubernetes is also easy. Kubernetes can automatically scale your application if there is any surge in traffic. It monitors the health of your entire application and self heals if any faults are detected on autopilot. Kubernetes is an important piece of microservice architecture. Microservice architecture is the most commonly used architecture today and Kubernetes is just the right tool to manage it. In fact, Kubernetes was developed to serve this purpose alone.

Conclusion

We hope this article helped you get a good insight over Kubernetes. Overall, Kubernetes is a great tool to manage containers. If you work with large distributed systems or big clusters of microservices, then you should definitely learn Kubernetes. Kubernetes is here to stay and it’s not going anywhere anytime soon. Kubernetes comes integrated with most cloud providers today.

Leave a Comment

Your email address will not be published. Required fields are marked *