what is kubernetes and what is a k8s cluster?

274 viewsEngineeringOther

what is kubernetes and what is a k8s cluster?

In: Engineering

2 Answers

Anonymous 0 Comments

Kubernetes is a tool that manages containers, typically run by a program called Docker. A container is a small mini operating system that contains only enough software to run a specific function such as Apache Tomcat webservers or other tools.

Ok, you ask, why would you want to do this? Because containers are small and lightweight and many can be produced on the fly, used for a purpose and then immediately discarded. Need to suddenly have more webservers during busy hours? Containers allow you to do that, then free up system resources when you don’t need them any more.

Kubernetes, or K8 as it’s called, is a way to manage these container images. One server, the K8 master, will connect to other computers, called nodes, and create the containers on there as needed. Then when the K8 software realizes it doesn’t need those containers any more it can shut them down and release the CPU/Memory for other tasks. K8 clustering software also will do things like load balance and control security of the clusters. It can also isolate different container types, such as one container for testing and another container used for production work.

Anonymous 0 Comments

First off, if it’s not clear: k8s is just short for kubernetes. It’s fairly common in tech to do first letter-number of letters in the middle-last letter abbreviations. so k8s for k-ubernete-s, l10n for l-ocalisatio-n, i18n for i-nternationalisatio-n, etc.

If you run the infrastructure for a big company, you have a major problem: having servers that are perfectly sized to fit the software you want to run is a special type of logistical hell. Some software requires way too much capacity to run on just one server. Some software has low enough requirements that you could pack hundreds of the things in one single server, but you still have to run multiple copies so you can handle failures. Once you put all of those requirements together, it’s just too much chaos to manage manually.

One of the most popular strategies people have come up with to handle this problem is that you have a big fleet of servers that come in maybe a handful of flavours for different major usecases, and you run all of them centrally. You just write a bit of software to coordinate that fleet, then have your developers tell that software e.g. “I need to run five copies of this program, but each copy only needs a tiny bit of CPU power and RAM”, and you let the software choose which servers should be used to provide those five copies. If one copy crashes, the software will start it up again – but maybe not on the same server!

As you might’ve guessed by now, “that software” is Kubernetes – or Nomad, or Mesos, or whatever. Like Windows/macOS/Linux, there’s several options. Kubernetes was originally an internal tool at Google, but it’s become its own thing since they released it publicly.

A cluster is a group of servers that’s being coordinated together, so a kubernetes cluster is a group of servers that’s being coordinated together _by using kubernetes_. It’s literally just that.

Note that, much like “computer” covers everything from a super basic laptop all the way up to massive servers or workstations, the “group of servers” that form clusters are likewise diverse. I’m building two small k8s clusters at home based on [these things](https://turingpi.com/), but a typical cluster at Big Tech Co might be a few of [these cabinets](https://uk.pcmag.com/social-media/87337/facebook-building-new-data-center-in-denmark).