BG
Back to blog

What is Kubernetes?

May 29th 2020 / Programming

A few weeks ago we made sure to tell you what Docker is. Now we've decided it is time to tell you more about Kubernetes – an open-source platform, which we began using the past year.

What is actually Kubernetes?

It is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem, and Kubernetes services, support, and tools are widely available.

How does it work?

Kubernetes eliminates many of the manual processes, which are involved in deploying and scaling containerized applications. This way you can cluster together groups of hosts running Linux containers, and Kubernetes helps you efficiently and easily manage those clusters.

A cluster is made up of many virtual or physical machines that each serve a specialized function either as a master or as a node. Each node hosts groups of one or more containers, which contain your applications, and the master communicates with nodes about when to create or destroy containers. At the same time, it tells nodes how to re-route traffic based on new container alignments.

Kubernetes

What can you do with Kubernetes?

In a production environment, you have to manage the containers which run the applications and ensure there is no downtime. The easiest way to manage this is to use Kubernetes.

1. It can expose a container using the DNS name or using its own IP address. If traffic to a container is high, Kubernetes is able to load balance and distribute the network traffic so that the deployment is stable.

2. Kubernetes allows you to automatically mount a storage system of your choice, such as local storage, public cloud providers, and more.

3. You can describe the desired state for your deployed containers using Kubernetes, and it can change the actual state to the desired state at a controlled rate. For example, you can automate Kubernetes to create new containers for your deployment, remove existing containers, and adopt all their resources to the new container.

4. You provide Kubernetes with a cluster of nodes that it can use to run containerized tasks. You are able to tell Kubernetes how much CPU and memory (RAM) each container needs. Kubernetes can fit containers onto your nodes to make the best use of your resources.

5. Kubernetes restarts containers that fail, replaces containers, kills containers that don’t respond to your user-defined health check, and doesn’t advertise them to clients until they are ready to serve.

6. Kubernetes lets you store and manage sensitive information, such as passwords, OAuth tokens, and ssh keys. You can deploy and update secrets and application configuration without rebuilding your container images, and without exposing secrets in your stack configuration.

What about Docker though?

Docker still does its own tasks. When Kubernetes schedules a pod to a node, the Kubelet on that node will instruct Docker to launch the specified containers and then continuously collects the status of those containers from Docker and aggregates that information in the master. Docker pulls containers onto that node and starts and stops those containers as normal. The difference between the two services is that instead of admin doing all by hand, it is performed by an automated system.

In fact, why it is better to use Kubernetes?

Automation is the key part. You are not doing all the tasks by hand and this way you save time and fasten the workload. With the right implementation of Kubernetes, you can orchestrate all parts of your container infrastructure. What better you can ask for?