Kubernetes is an open-source system for container orchestration for automatic deployment, scaling and container application management. Originally it was designed by Google and now is managed by Cloud Native Computing Foundation. Its goal is to create a platform for automatized deployment, scaling and operations on application containers throughout host clusters. It works with wide scale of container tools as is e. g. Docker.

Design

Kubernetes defines set of building blocks, i. e. “primitives”, which collectively create mechanism, which ensures application deployment, management and scaling. Kubernetes is loosely bound and expandable the way to be able to manage with different loads. For the most part, this extensibility allows Kubernetes API, which use internal components same as extension and containers, which run through Kubernetes.

Pods

The basic Kubernetes schedule unit is pod. It adds higher level of abstraction by grouping together the container components. Pod contains one or more containers, by which is guaranteed that they are on the same location on the host machine and can share sources.

Within cluster, to each pod is to Kubernetes connected unique IP address, which allows application usage of ports without the risk of conflicts. Pod can define volume, e. g. at local storage or network drive and release it to containers that belongs to pod. Pods can be managed manually through Kubernetes API or their management can be delegated to controller.

Controllers

Controller is a loop, which requires cluster’s state transition to required state. It achieves this by managing set of pods. One of the controllers’ type is replication controller, which manages replication and scaling by executing specific number of pod copies throughout cluster. It also creates substitute pods, if some of the nodes fails.

Among other controllers, which are part of the Kubernetes system core, belongs DaemonSet controller, which executes exactly one pod on every machine (or subset of machines) and Job controller, which executes pods, which lead to an end e. g. in case of cron jobs. Pod’s set, which the controller manages, is defined by their labels, which are a part of controllers’ definition.

Services

Kubernetes service is set of pods, which work together. This group of pods, which create service together, is defined by label.

Architecture

Kubernetes has an architecture based on control machine and slaves. Components are then possible to divide into those that manage individual node and those that are a part of control machine. The control machine is a main control unit of cluster, which manages its load and controls the communication throughout the system. It consists of different components, each of them has own processes, which can run on one control node or more.

Advantages of using Kubernetes

  • Scalability. Kubernetes is loosely bound and expandable the way to be able to manage with different loads.
  • Simple container management. Kubernetes helps reduce the delay in communication, which, with the usage of only the Docker, can be a problem.
  • The work with Microservices. During the work with Microservices is possible to use random amount of live replication, which means that if the project expands, the implementation of changes is not very demanding.
  • Documentation. Kubernetes has available corresponding documentation.

Disadvantages of using Kubernetes

  • Configuration. Configuration is relatively difficult and is needed to set up from the very beginning. It takes a lot of time than the suitable configuration is found. Kubernetes is installed very complicatedly and takes a lot of time than it is managed to execute.
  • Services. It is not easy to manage services.
  • Documentation. Although the documentation is available, it is not very user friendly.