Open In App

Kubernetes Cluster

Last Updated : 08 Jan, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

A group of nodes (Computers/Operating systems) working together to communicate with the help of Kubernetes software is known as the Kubernetes cluster. It works in a mechanism in such a way that it performs actions on the worker node with the help of the manager node.

Need for a Kubernetes Cluster

In containerization when we launch our application through containers, we need to monitor the containers to keep on checking the status of the containers and once the required container goes down then immediately relaunch the containers making it fault tolerance ( making the application available without downtime of application failure ) to handle this case Google develops the Kubernetes tool and later made it as opensource It comes upan extra layer on top of container to keep some information known as metadata and this container with metadata known as Pod.

Mechanism of the Kubernetes Cluster

In the metadata, we provide information such as pod names, labels, etc. Kubernetes keeps on monitoring the status of the containers with the help of labels in metadata. Kubernetes comes up with many services on coming versions making high weighted setup. It will monitor the pods and check the current and desired count of the specific pods. If the desired state is more than the current state It will request to containerd (On behind Kubernetes uses a Container engine only to launch the containers).

Kubernetes-Architecture

Some of the main components in kubernetes Manager Node :

  • KubeProxy
  • Kube API server
  • KubeController
  • kube Scheduler

1.KubeProxy: It is a resource in kubernetes cluster that helps in setting up the network setup through out the cluster making the nodes able to communication with eachother.

2. Kube API server: It is a resource in kubernetes it takes the api requests from the other nodes and passes to kubernetes controller to perform the specified actions. It works in the front line of the kubernetes manager node.

3. Kubernetes Controller: It monitor the metrics of the nodes in the kubernets cluster ie., cpu , ram , storage other hard resources of the nodes in the cluster. Based on the monitoring when there is a need of launching the new pods , It specifies kubernetes scheduler where to launch the pods , based on resources quota as required on checking the availability as per need on the nodes.

4. Kube Scheduler: It is a kind of resource in kubernetes Manager , that help in scheduling the pods by making request to the backend container engine ie., containerd of the particular node.

Some Of The Popular Resources Of The Kubernetes Cluster

Pod

A pod is a smaller unit in kubernetes it comes metadata on top of containers . A pod can contain one or more containers based on that is will be called as single pod or multipod . Inside the pod containers share the same network namespace , storage , configuration. These are designed to run as a single instance of a process , facilitating easy scaling and management.

Deployment

It is kind of resource in kubernetes that manages the deployment of the stateless applications ensuring desired state and making high availability. It allows the declartive updated for the applications , supporting rolling updates and roll backs. Based on preferences of seamless switching of traffic , immediate updates of new features generally follows different deployment strategies such as Ramped Deployment , Recreate Deployment , Blue-Green Deployment , Canary Deployment strategies.

StatefulSet

It is a kind of resource in kubernetes that manages the deployments and scaling of stateful applications maintaining the stability by providing the stable network identifiers and persistent storage. It is mostly used for the databases applications.

ReplicationController

It is older concept based kind of resource in kubernetes that follows identity based checking on ensuring the specific number of replicas of a pod are running on checking current state == desired state . It check the status of the pods of the specific pods with help of the labels. It uses equality operators ( == , != ). It can check only on key pair at a time i.e key==value.Know more about Kubernetes replcation controller.

ReplicaSet

A kind of resource in kubernets that ensures a specified number of identical pods keep on running at any times. It is the new approach for the ReplicationController resource. It also check the pods status with the help of labels but uses Membership operators such ( IN , NOT IN ). It mainly used for scaling and load distribution of specified specific number of pod replicas. Know more about ReplicaSet.

PVC ( Persistent Volume Claim )

It is a kind of resource in kubernetes act as a request made by developers for need of specific storage resources for pods . In this pvc requirement of storage resource will be specified in terms of size and access modes and other attributes. It serves as an abstration layer between storage requirements defined by applications and actual implementation provided by Persistant Volume. It allows pods to consume persistent volume without needing knowledge of the underlying infrastructure.

PV ( Persistent Volume ):

A kind of resource in kubernetes providing the physical or network storage resource in kubernetes cluster. It acts as abstract underlying the storage details making it easier management and assessment of the persistent storage. In this they will 3 types of reclaim policies based the status of PV once it is unmounted from the pod application.

SC ( Storage Class )

A kind of resource in kubernetes enabling dynamic provisioning of storage response to PVC requests. It defines storage policies in such away of allowing administrators to set rules for dynamically creating PVs. It provides the enhancing flexibility and efficiency in managing storage resources within a kubernetes cluster. They will no need of waiting for PVs whenever PVC requests cames , it customizes the rules and provided the storage with needed specifications .

How To Setup The Kubernetes ?

Setting up the kubernetes cluster can be done on top of physical hardware or virtual machines or on top of cloud services. A few quite popular cloud providers that provides kubernetes cluster as a services such as EKS (Elastic Kubernetes Cluster) in AWS , GKE (Google Kubernetes Engine) in GCP , AKS (Azure kubernetes service) in Azure. For the installation guidelines refer this article Installation of Kubernetes on Ubuntu.

FAQs on Kubernetes Cluster

1. What Is Kubernetes Cluster?

A group of nodes running containerized apps in automated way for efficient deployment and management.

2. How Does Kubernetes Ensure Availability?

Through ReplicaSets , Node distribution and auto-rescheduling for minimal downtime kubernetes ensures abailability of application pods.

3. Explain Persistent Volumes (PV) And Claims (PVC).

PV represents permenant storage, PVC represents storage request specific characteristics, managing data persistence

4. How Does Scaling Work In Kubernetes ?

Horizontal scaling with ReplicaSets adjusts pod replicas for varying workloads.

5. What Is The Role of a Kubernetes Service?

It facilitates seamless pod communication, providing stable IP and DNS abstraction.



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads