Thursday, February 8, 2024

What Is Kubernetes and why we use it ?

 

What Is Kubernetes ?

Kubernetes is an open-source orchestrating platform designed to automate the deployment, scaling, and management of containerized applications.

Kubernetes provides a set of tools for orchestrating and managing containers at scale.
It allows you to define how your applications should run, handle their deployment and scaling.



Why We Use Kubernetes ?

We use Kubernetes because it makes it easier to manage and scale applications, ensuring they run smoothly and reliably.
It simplifies tasks like deploying software, handling increased user traffic, and recovering from failures.
Kubernetes automates many aspects of managing applications in containers, providing a more efficient and flexible way to run and scale our software.


Architecture of kubernetes ?


1) Master Node:

  • a) Kubernetes API Server (Control Center): It's like the command center where you give orders. You tell it what you want (deploy an app, scale it up, etc.), and it makes things happen.
  • b) etcd (Memory): is kind of memory of the cluster. It stores all the information about the cluster - what apps are running, their configurations, etc.


2) Worker Nodes:


  • a) Kubelet (Worker's Supervisor): Each worker node has a supervisor called Kubelet. It listens to the API Server and ensures that the containers (your apps) are running as they should.
  • b) Kube-Proxy (Traffic Cop): This component helps manage network traffic between different pods and services. It ensures they can talk to each other.


3) Controller Manager (Task Manager):

This keeps an eye on the overall state of the cluster. If something goes wrong or if there's a difference between the desired state (what you want) and the actual state, the Controller Manager takes corrective actions.

4) Scheduler (Resource Organizer):

It decides which worker node should run your application based on available resources. If you say you want three copies of your app running, the Scheduler decides where to put those copies for the best performance.


  • In simple terms, the Master Node is the boss, the Worker Nodes do the actual work, the Controller Manager makes sure everything is as it should be, and the Scheduler decides where to put things. All these components work together to keep your applications running smoothly on a Kubernetes cluster. 



  • In the Kubernetes architecture diagram above you can see, there is one master and multiple nodes.
     
  • The Master node communicates with Worker nodes using Kube API-server to kubelet communication.
     
  • In the Worker node, there can be one or more pods and pods can contain one or more containers.
     
  • Containers can be deployed using the image also can be deployed externally by the user.

No comments:

Post a Comment

testing