How Kubernetes works: operation and structure

How Kubernetes works: a mini guide to one of today’s most important tools for developers.

How does Kubernetes work? As we point out in this mini guide, Kubernetes is an important tool for developers who want to expand their skill set and who take their profession seriously. 

Let’s start by defining exactly what Kubernetes is (What is Kubernetes), that is, an open-source container-orchestration platform, designed for running large-scale distributed applications and services.

OK. So, having said that, which may not mean much to you right now, let’s examine how Kubernetes works and explore the main features of this Devops tool which is, more than any other current platform, a very important tool for developers who want to expand their skill set.

Designing projects with Kubernetes

To understand how Kubernetes works, let’s start with the concept of design. Designing with Kubernetes is all cluster based. What should a cluster be? 

  • Secure! A “compliant” cluster must necessarily be in compliance with the most up-to-date security best practices.
  • Easy to use It must work with just a few simple commands. 

Extensible. It must not be bound to any vendor lock-in and, above all, it must be customisable using a configuration file.

Kubernetes Cluster

A Kubernetes cluster has two essential components that need to be examined in detail

  • control plane
  • nodes

The Control Plane

The nerve centre of the Kubernetes cluster is the control plane, where we find the Kubernetes components that control the cluster, the cluster status, and its configuration data.

Each Kubernetes control plane is made up of these fundamental components. The control plan ensures that the cluster is configured as optimally as possible. 

kube apiserver

The Kubernetes API Server is the key component of the Kubernetes control plane, as it manages all internal and external requests. The API server determines if a request is valid, and if so, proceeds to process it

kube scheduler

The Kubernetes Scheduler takes care of ensuring the integrity of the cluster and that the cluster has sufficient capacity to host other new containers.

kube controller manager

The Controller Manager takes care of the actual running of the cluster. Specifically, it  combines several control functions in a single controller.

etcd

An etcd is nothing more than a key-value data store; it stores data and configuration information related to the overall  state of the cluster.

Nodes

A Kubernetes cluster must have at least one Worker node. There is, however, usually more than one node in a cluster. Pods are scheduled and orchestrated to run on nodes, so adding more nodes is sufficient to increase the cluster capacity.

Every Kubernetes node, in its turn, is made up of these fundamental components.

pod

As we have just shown, pods consists of one or more containers. A pod is the smallest unit in the entire Kubernetes system. 

container runtime engine

Each node supports a runtime engine to run containers. Not surprisingly, Docker runtime is one of these! 

kubelet: 

A kubelet is a mini application that communicates with the control plane and verifies that the containers are running in a pod.

kube proxy

A Kube-proxy’s function is to route the network traffic, internal and external, to the cluster, by coordinating the packet filtering of the operating system.

Share: Facebook Twitter Linkedin

Comments