We are a small, but industrious team of developers, continuously expanding our capabilities the offer bigger and better services. Whenever we have a mutli-cloud project that relies on multiple components to function, we turn to Kubernetes, to manage, configure and customize our installation.
First, to understand why containers (and therefore Kubernetes) are so useful, we must look at a time before containers. A traditional deployment is where it all started. In this deployment type, applications run on physical servers, with no way to define resource boundaries and managing resource allocation. One application regularly hogged all resoures, leaving others to underperform. The solution to this was to run each application in a different physical server, which understandibly wasn’t cost effective, very hard to scale and left a lot of underutilized resources.
Then came the idea of virtual machines. This allowed you to run multiple virtual computers on a single physical machine, allowing you to clearly define boundaries and setting security rules as applications could be prevented from interacting with each other. The result was a scalable, updateable application that made full and clear use of your resources. But, as brilliant as it was, this “computers inside a computer” idea was as clunky as it sounded.
Now we’re at the era of containers. They are similar to VMs, in that they are isolated spaces, but their relaxed properties allow them to share operating systems among containers, making them much lighter than a full-on computer inside your computer.
Containers are similar to VMs, but they have relaxed isolation properties to share the Operating System (OS) among the applications. Therefore, containers are considered lightweight. Similar to a VM, a container has its own filesystem, share of CPU, memory, process space, and more. As they are decoupled from the underlying infrastructure, they are portable across clouds and OS distributions.
Containers are a good way to bundle and run your applications. But, as with anything containers can go down for any amount of reasons, updates may happen to your application, maybe you want to take everything into a different setting, or maybe your application is doing so well, that the demand becomes suffocating. You need to manage them to ensure that there is no downtime. If a container goes down, you need to start another one, if one is overloaded, you must direct traffic to the other, if you need to roll an update you need to make sure none of them fall behind.
And that’s where Kubernetes shines.
Kubernetes provides you with a framework to run distributed systems resiliently. It takes care of scaling and failover for your application, provides deployment patterns, automates rollouts and rollbacks, allocates your resources optimally so that nothing is idle and wasted, and manages your secret informations and configurations so you can use them easily.