Anyone who works in IT, in any capacity connected to software will have heard Kubernetes more than once.
While the answer is obvious to anyone in the prog/dev space and many people outside, for others it’s really unclear. People keep trying to explain it to me but it sounds like gibberish. please ?
In: 483
As computers became bigger and more powerful – RAM and CPUs, the cost of a single machine for a dedicated app became disproportionate. Both Windows and Linux machines can be shared — you can run multiple apps at the same time. But, if one app misbehaves, it can take down the whole computer.
Virtualisation provides a way to run a machine inside the machine – so you could carve up the machine into 4 quarters, or 2 halves, and run the same apps, but isolated from each other. If one crashes, it wont affect the other.
Virtualisation comes with a cost – and if you run lots of VMs on a machine, then you can waste a lot of resources. Also the resources are dedicated – you cant move the RAM or CPU around to whoever needs it.
Containers is like virtualisation, but the applications run under the same operating system. The apps are isolated, and each container can specify how much memory it wants, how much CPU, disk etc. One can avoid kubernetes and with a bit of scripting, make it easy to launch an application in a container.
As machines get bigger, the DIY approach doesnt work too well. If you have a very big machine, say 100 containers in it, then you could spend too much time managing resources. A good comparison is an 8-bedroom house. You could have 8 occupants, or merge a couple of rooms to make them bigger and reduce the number of people the house can hold.
A runaway app in a container wont crash the machine.
The complexity to run potentially hundreds or thousands of applications, across hundreds, thousands or more machines leads to kubernetes. A standardized way to describe apps – what they need (CPU, Memory, networking, disk) and deny any app from pigging out and threatening the large machine, housing lots of apps.
Add to this, enhanced monitoring, metrics gathering – and you have something that large corporations want. Without VMs or containers, in a large organisation, teams order new hardware, and by the time it arrives, it gets forgotten about. A large organisation can easily lose or waste 30-50+% of the available capacity, yet, new projects are denied budget to acquire new machines.
So, kubernetes is a standardised way – from open-source, to paid contracts/licenses with vendors, to allow fine-gained subdivision of a large arsenal of machines.
(You can run kubernetes at home, on a single machine if you want, but its a lot of overkill unless you are in training, or just want to experiment).
Google for ‘cgroups’ for Linux – and you can use the underlying mechanisms to create your own containers (without kubernetes).
Imagine you have thousands of computers in your organisation running 24/7. You will want to
– monitor that computers are up and running, restart failing computers
– have less computers running at night and more during the day
– roll out new new programs on your computers
– change network and disk settings based on business needs
… and many more similar tasks as business would require
Your options are 1) have a team of people who would be doing this work, or 2) write software that will do that for you. Option 2 is Kubernetes, roughly speaking.
I intentionally didn’t use more appropriate technical terms to keep it ELI5
Ever heard a developer say “Well it works on my machine”? It used to be a common problem, so instead of writing on our own computers, we write code that is fully self-contained, called… containers. Having a lot of containers that do specialized things can be complicated. Kubernetes manages these containers at scale using automation. It helps them talk to each other and the outside world, helps them get the right resources they need, helps them grow or shrink as needed, etc.
This is incredibly oversimplified, but it’s ELI5.
**Containers:**
Its best practice to deploy software in **Containers**. You can think of it like a seperate OS, which is running only to run this one programm on there (like a server). We do this to avoid side effects from junk or other stuff that could be interfering with that one programm you want to deploy. If you want to read more about this here are the 2 most popular used tools for this: [Docker](https://www.docker.com/) and [Podman](https://podman.io/)
**Kubernetes:**
For some big Websites (for example) its best to deploy more containers based on how many users currently want to use the side. Here is where [**Kubernetes**](https://kubernetes.io/) comes to play to spin up as many containers as needed.
We call that **Loadbalancing** (or **scaling**) however this is only one usecase for Kubernetes (probably the most important one tho).
Other use cases are management of these containers in general (**scheduling)** like updating, restarting (**making sure the programm doesnt fail**), and their communication in general (like networking, storage)
**Why its important:**
Kubernetes is a code like configuration tool for infrastruktur which you can run on your own server, in the cloud, or in hybrid environments which is pretty cool but a pain in the ass to setup tho. Using it can **safe** your company **a lot of money** (**by scaling correctly** for example, or avoiding crashes etc..), however not every project should use Kubernetes but a lot of teams default to it because its “the thing to do” as only large scale projects really benefit from using it.
Latest Answers