The Kubernetes Cluster Architecture Simplified

The Kubernetes Cluster Architecture Simplified

Our Kubernetes Online Training provide you to learn about container-based clusters, deployments, management, etc. Our Kubernetes Online Course also includes live projects

What is the purpose of using Kubernetes? The purpose of Kubernetes is to host your applications in the form of containers in an automated fashion so that you can easily deploy as many instances of your application as required and easily enable communication between different services within your application. For the sake of simplicity, I am going to use an analogy of ships to understand the architecture of Kubernetes.

We have two kinds of ships in this example:

  1. Cargo Ships: do the actual work of carrying containers across to sea.
  2. Control Ships: are responsible for monitoring and managing the cargo ships. The Kubernetes cluster consists of a set of nodes which may be physical, virtual, on-premise, or on cloud that host applications in the form of containers. These relate to the cargo ships in this analogy. Kubernetes Online Course helps you to learn more effectively. The worker nodes in the cluster are ships that can load containers. But somebody needs to load the containers on the ships among other tasks such as:
  • Plan how to load.
  • Identify the right ships.
  • Store information about the ships.
  • Monitor and track the location of containers on the ships.
  • Manage the whole loading process etc.. This is done by the control ship that hosts different offices and departments, monitoring equipments, communication equipments, cranes for moving containers between ships etc. The control ships relate to the master node in the kubernetes cluster, which is responsible for managing the cluster. Tasks done by the control ships include:
  • Storing information regarding the different nodes.
  • Planning which containers goes where.
  • Monitoring the nodes as well as the containers on them.

The Master node does all of these tasks with the help of a set of components known as the control plane components. Control Plane Components We will look at each of these components now. ETCD You could imagine that many containers are being loaded and unloaded from the ships on a daily basis. As a result, we must keep track of information about the different ships, such as:

  • What container is on which ship.
  • At what time was each container loaded. All of these are stored in a highly available key value store known as ETCD, which is a database that stores information in a key-value format. We will look more into what ETCD cluster actually is, what data is stored in it, and how it stores the data in another post.

Schedulers When ships arrive, you load containers on them using cranes, which identify the containers that need to be placed on ships based on its size, capacity, the number of containers already on the ship and any other conditions such as:

The destination of the ship.

  • The type of containers it is allowed to carry. These are known as schedulers. In a Kubernetes cluster, as scheduler identifies the right node to place a container on, based on:
  • The containers resource requirements.
  • The worker nodes capacity.
  • Any other policy or constraints such as taints and tolerations or node affinity rules that are on them. We will look at these in much more detail with examples in the next section. We have a whole section dedicated for scheduling alone.

Controllers There are different offices in the master ship that are assigned to special tasks or departments. For example, the operations team takes care of ship handling traffic control etc. They deal with issues related to damages, the routes the different ship take etc. The cargo team takes care of containers, when containers are damaged or destroyed they make sure new ones are made available. Also, there exists a service office that takes care of the I.T. and communications between different ships.

Similarly, in Kubernetes, we have controllers available that take care of different areas. The node-controller takes care of nodes. They’re responsible for onboarding new nodes to the cluster, handling situations where nodes become unavailable or gets destroyed. The replication controller ensures that the desired number of containers are running at all times in your replication group. Kubernetes certification training along with real time projects.

Communication in the Clusters So we have seen different components like the different offices the different ships the data store the cranes.

But how do these communicate with each other? How does one office reach the other office and who manages them all at a high level? The kube-api server is the primary management component of kubernetes. The kube-api server is responsible for orchestrating all operations within the cluster. It exposes the Kubernetes API which is used by externals users to perform management operations on the cluster, as well as the various controllers to monitor the state of the cluster and make the necessary changes as required and by the worker nodes to communicate with the server.

What About Containers? Now, we are working with containers here. Containers are everywhere, so we need everything to be container compatible. Our applications are in the form of containers: the different components that form the entire management system on the master nodes could be hosted in the form of containers. The DNS service networking solution can all be deployed in the form of containers. So we need some software that can run containers and that’s the container runtime engine. A popular one being Docker. So we need Docker or it’s supported equivalent installed on all the nodes in the cluster including the master node if you wish to host the control plane components as containers. Can it Only Be Docker? No it doesn’t always have to be Docker. Kubernetes supports other run time engines as well like ContainerD or Rocket. Moving On To the Cargo Ships (Nodes) Every cargo ship has a captain which is responsible for:

  • Managing all activities on these ships.
  • Liaising with the master ships starting with letting the master ship know that they are interested in joining the group
  • Receiving information about the containers to be loaded on the ship.
  • Loading the appropriate containers as required.
  • Sending reports back to the master about the status of this ship and the status of the containers on the ship etc.

Now, the captain of the ship is the kubelet in Kubernetes. A kubelet is an agent that runs on each node in a cluster. It listens for instructions from the kube-api server and deploys or destroys containers on the nodes as required. The kube-api server periodically fetches status reports from the kubelet to monitor the state of nodes and containers on them. The kubelet was more of a captain on the ship that manages containers on the ship. But the applications running on the worker nodes need to be able to communicate with each other. For example you might have a web server running in one container on one of the nodes and a database server running on another container. How would the web server reach the database server on the other node? Communication Between Worker Nodes Communication between worker nodes are enabled by another component that runs on the worker node known as the Kube-proxy service. The Kube-proxy service ensures that the necessary rules are in place on the worker nodes to allow the containers running on them to reach each other.

If you want to Gain In-depth Knowledge on Kubernetes, please go through this link Kubernetes Online Training

kubernetes training kubernetes course kubernetes online course online kubernetes course

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

50+ Useful Kubernetes Tools for 2020 - Part 2

Our original Kubernetes tool list was so popular that we've curated another great list of tools to help you improve your functionality with the platform.

Kubernetes vs Docker

Get Hands-on experience on Kubernetes and the best comparison of Kubernetes over the DevOps at your place at Kubernetes training

Typical flow for deploying applications to Kubernetes

Get Hands-on experience on Kubernetes and the best comparison of Kubernetes over the DevOps at your place at Kubernetes training

Workday HCM Online Training | Workday Course | OnlineITGuru

Workday HCM Online Training will provide you to learn about workday HCM, HR functions, business process, etc with realty. Workday HCM Training also includes live projects

How to use Terraform and Kubernetes to manage the IT worlds

Get Hands-on experience on Kubernetes and the best comparison of Kubernetes over the DevOps at your place at Kubernetes training