What is Kubernetes?

Kubernetes is an open-source platform that maintains container workloads and services. It aids in declarative configuration and automation. Kubernetes consists of an array of data constructs that allow us to run resilient, distributed applications.

Why use Kubernetes?

The most common issue developers face is that they have to spend a substantial amount of time and effort setting up a suitable environment rather than focusing on the actual algorithm. Serverless is a cutting-edge approach that helps us with such architecture issues.

Kubernetes architecture

Kubernetes follows a client-server architecture. The architecture comprises one master/control node and its associated worker nodes (See illustration below).

Flow diagram of Kubernetes architecture

Control plane components

The control plane has two main roles:

  • It manages the global decisions of the cluster. These include tasks like scheduling.
  • It monitors and handles cluster events, like creating a new pod when a replica field is unsatisfied.

The main components of the control plane are listed below:

  • Kube-apiserver: This component acts as an interface to the Kubernetes API. The server is responsible for maintaining the structure of the cluster, handling requests (changes to pods, services, etc.), and providing a frontend for the cluster.
  • etcd: This component is key-value storage used to store all cluster data.
  • Kube-controller-manager: This component manages controller processes. It runs essential services in the background and carries out designated tasks.
  • Kube-scheduler: This component searches for new pods with no assigned node and schedules them on a suitable node based on the requirements.

Worker node components

These components execute at each node. They manage the running pods and provide a consistent Kubernetes environment.

The main components are listed below:

  • Kubelet: A service that runs on each node of the cluster. It receives and carries out modification requests and ensures the running and health of the pods and containers.
  • Kube-proxy: It is a network proxy that runs on each node in your cluster. It maintains network rules that enable communication to our pods from network sessions inside or outside the cluster.

Copyright ©2024 Educative, Inc. All rights reserved