Kubernetes is an open source orchestrator for the deployment of containerized applications.

Kubernetes was originally developed by google, which drew on its long experience of deploying scalable and reliable systems in containers via application-oriented APIs.

What do we mean by <<reliable and scalable distributed systems>> ?

It should be noted that more and more services are delivered over the network via APIs. These APIs are often delivered by a distributed system, with the different elements that implement these APIs running on different machines, connected through the network and coordinating their actions through network communications. As we increasingly rely on these APIs to handle all aspects of our daily lives (for example, finding the route to the nearest hospital), these systems need to be extremely reliable. They cannot afford to crash, even if part of the system crashes or malfunctions. Likewise, they must remain available even during software deployments or maintenance operations. Finally, as more and more people are present on the Internet and use such services, they must be very scalable in order to be able to increase their capacity to satisfy a continuous increase in use without having to radically modify the design of the distributed system that implements the services.

The value of immutability

Containers and Kubernetes encourage developers to create distributed systems that adhere to immutable infrastructure principles, once an artifact is created in the system, user changes cannot change it.

Declarative configuration

Immutability extends beyond the containers running in your cluster and also applies to how you describe your application to Kubernetes. Any element in Kubernetes is a declarative configuration object that represents the desired state of the system. It’s the job of Kubernetes to make sure that the real state of the world corresponds to this desired state.

Self-healing systems

Kubernetes is an online self-healing system. When it receives a desired state configuration, it does not simply take action to make the current state match the desired state at any given time, it acts continuously to ensure that the current state matches. permanently in the desired state. This means that not only Kubernetes will initialize your system, but in addition it will protect it against any failure or disturbance that could destabilize it and affect its reliability.

We very often compare Kubernetes with the Docker container storage platform, and more precisely with Docker Swarm the native clustering solution for Docker containers.

These two tools indeed offer functionalities for creating and managing virtual containers. However, these two systems have many differences.

First of all, Docker is easier to use than Kubernetes.

One of the faults often criticized with Kubernetes is indeed its complexity. For example, Kubernetes takes a long time to install and configure, and requires some planning because nodes must be defined before you begin. The procedure is also different for each operating system.

For its part, Docker Swarm uses the Docker CLI to run all portions of its program. Simply learn to master this set of tools to be able to create environments and configurations. It is also not necessary to map the clusters before starting.

Additionally, Kubernetes can be run on top of Docker but requires knowing the characteristics of their respective CLIs to be able to access the data via the API. You need to know the Docker CLI to navigate within the framework, and the Kubernetes kubectl CLI to run programs.

In comparison, the use of Docker Swarm is similar to that of other Docker tools like Compose. We use the same Docker CLI, and it is even possible to launch new containers with a simple command. Due to its speed, versatility and ease of use, Docker therefore takes a certain advantage over Kubernetes in terms of usability.

The two platforms were also distinguished in the past by the number of containers that can be launched, as well as by their size. In this area, Kubernetes had the advantage. However, the recent Docker updates have narrowed the gap.

Now both systems can support a maximum of 1000 clusters and 30,000 containers.

However, a test conducted by Docker in March 2016 found that Docker can launch the same number of containers as Kubernetes five times faster. However, once the containers are launched, Kubernetes retains an advantage in terms of responsiveness and flexibility.

Either way, nothing prevents you from using both Kubernetes and Docker Swarm. It is for example possible to use Docker and Kubernetes together to coordinate the programming and execution of Docker containers on Kubelets. The Docker engine takes care of running the container image, while service discovery, job balancing, and networking are handled by Kubernetes.

These two tools are therefore very suitable for the development of modern Cloud architecture despite their differences.