Skip to content

Kubernetes (k8s) – simply explained!

  • Data

Kubernetes is a container orchestration system. This means that applications can be split between different containers and thus run faster and more efficiently. It is an open source project and was first released in 2014. Kubernetes is very powerful and can manage systems distributed over thousands of computers.

By the way, the Greek word Kubernetes means helmsman and is exactly what the program does, it controls. In this article we will mainly use the abbreviation of Kubernetes k8s. This comes from the fact that the word Kubernetes starts with k, ends with s and there are 8 letters in between.

What are containers and why do we need them?

One of the defining characteristics of Big Data or Machine Learning is that in many cases a single computer is not sufficient to handle the massive computational loads. Therefore, it is necessary to use multiple computers that can share the work. In addition, a cluster can also compensate for failures of individual computers, which in turn ensures that the application is continuously accessible. We refer to such an arrangement of computers as a computing cluster or distributed system for parallel computing.

Now we know what clusters are, but we have not yet understood what containers are all about.

The containers come from the Docker software environment, the detailed explanation of which we have saved for a separate article. For now, just this: we can actually think of Docker containers as relatively practical, like a shipping container. Let’s assume that three people are working on a certain task in this container (I know that this probably violates every applicable occupational health and safety law, but it fits our example very well).

In this container they find all the resources and machines they need for their task. They receive the raw materials they need through a certain hatch in the container, and they release the finished product through another hatch. Our shipping container can thus operate relatively undisturbed and largely self-sufficiently. The people inside will not notice whether the ship including the container is currently in the port of Hamburg, in Brazil or somewhere in a calm sea. As long as they are continuously supplied with raw materials, they will carry out their task no matter where they are.

It is the same with Docker Containers in the software environment. They are precisely defined, self-contained applications that can run on different machines. As long as they continuously receive the defined inputs, they can also continue to work continuously.

What do we need Kubernetes for?

What we’ve discussed up to this point: We use computing clusters to run computationally intensive projects, such as machine learning models, reliably and efficiently on multiple computers. In containers, in turn, we program subtasks that can be self-contained and that always run in the same way, regardless of whether they run on computer 1 or computer 2. That actually sounds sufficient, doesn’t it?

Distributed systems offer advantages over single computers as well as additional challenges, for example in the sharing of data or the communication between the computers within the cluster. Kubernetes takes over the work of distributing the containers to the clusters and ensures that the program runs smoothly. This allows us to focus on the actual problem, i.e. our specific use case.

Building a Kubernetes cluster

Kubernetes is typically installed on a cluster of computers. Each computer in this cluster is called a node. In turn, several so-called pods run on a computer or node. Finally, the containers with the smaller applications run on the pods and can communicate in a local system.

In order for the pods and the containers inside them to run without complications, there are some auxiliary functions and components in the Kubernetes cluster that make sure all systems are running.

Das Bild zeigt den beispielhaften Aufbau eines Kubernetes Clusters, inklusive Nodes und Control Plane.
Structure Kubernetes Cluster | Foto: Kubernetes
  • Control Plane: This is the computer that monitors the entire cluster. It does not run any pods for the application. Instead, the individual pods are assigned the containers to run on them.
  • Sched: The scheduler keeps an eye out within the cluster for newly created pods and assigns them to existing nodes.
  • ETCD: A repository for all information that accumulates in the cluster and needs to be kept, e.g. configuration metadata.
  • Cloud Controller Manager (CCM): When part of the system is running on cloud resources, this component comes into play and handles communication and coordination with the cloud.
  • Controller Manager (CM): The most important component in the Kubernetes cluster monitors the cluster and looks for failed nodes, then redistributes the containers and pods.
  • API: This interface enables communication between the nodes and the control plane.

The nodes have a much slimmer design than the Control Plane and contain two essential components for monitoring in addition to the pods:

  • Kubelet: It is the control plane within a node and ensures that all pods are running properly.
  • Kube proxy (k-proxy): This component distributes the incoming node traffic to the pods by creating the network inside the node.

This is what you should take with you

  • A network of different computers is called a cluster. A container, in turn, can perform a certain task autonomously, regardless of the system on which it does so.
  • Kubernetes handles the management of containers within a computing cluster for us.
  • The Kubernetes cluster has various components that ensure that all pods are running and the system continues to function.

Other Articles on the Topic of Kubernetes

  • Here you can find the documentation of Kubernetes with many interesting articles.
  • And here the directory of Docker and the corresponding Docker Containers.
close
Das Logo zeigt einen weißen Hintergrund den Namen "Data Basecamp" mit blauer Schrift. Im rechten unteren Eck wird eine Bergsilhouette in Blau gezeigt.

Don't miss new articles!

We do not send spam! Read everything in our Privacy Policy.

Cookie Consent with Real Cookie Banner