Kubernetes - K8s

Kubernetes - K8s

Kubernetes , also known as K8s, is an open-source system for automating deployment, scaling, and management of containerized applications.

What is a Kubernetes Cluster?

A Kubernetes cluster is a set of nodes that runs containerized applications and workloads. A Kubernetes cluster has two parts:

- The Control Plane( Master Node)

- The Compute Machines or Nodes( Worker Nodes)

No alt text provided for this image

The Compute Machines or Worker Nodes

A node, inside a Kubernetes cluster, is a worker machine that can either be a virtual or a physical machine depending on the cluster. Each node within the cluster is managed by the control plane and contains the services necessary to run Pods, which are made up of containers.

Wondering what are pods in Kubernetes? A pod is the smallest and simplest unit in the Kubernetes architecture model. It represents a set of running containers within the cluster.

Every cluster has at least one worker node. The worker node(s) are generally responsible to host the Pods. The Kubernetes control plane automatically controls and manages the scheduling of these pods across different nodes within the cluster keeping into account the available resources on each Node.

The Control Plane or Master Node

The control plane (master node), in the Kubernetes architecture, is an important part of the Kubernetes cluster. It exposes the API and interfaces for deploying and managing the complete lifecycle of containers. It manages the worker nodes and the pods within the Kubernetes cluster. The components of the control plane help in taking decisions about the cluster (like scheduling the pods), as well as identifying and responding to cluster events ( such as starting a new pod when the deployment’s replicas field is unsatisfied).

Here's the Kubernetes architecture diagram with all the components tied together.

No alt text provided for this image

Components of the Control Plane

Let's talk about the most crucial part of the Kubernetes cluster: the control plane. The control plane contains the core Kubernetes components that are responsible for controlling the complete Kubernetes cluster along with data that specifies the cluster’s state and configuration. Here, we’ll talk about the components of the control plane.

With the help of these K8s components, the Control Plane controls and responds to cluster events and makes sure that the containers within the K8s cluster are running in sufficient numbers and with the necessary resources.

kube-apiserver

The API server is a crucial component of the Kubernetes control plane that exposes the Kubernetes API. The Kubernetes API server, which is the front end of the Kubernetes control plane, is responsible for managing internal and external requests. It is the API server that determines whether a request is valid and in case if it is, then it processes the request.

etcd

etcd is the key-value store database that contains the configuration data and information about the state of the Kubernetes cluster. It is etcd, where users can find complete in-depth information and the true state of the cluster.

kube-scheduler

It is a component of the control plane that looks for newly created Pods with no assigned node. It selects a node for the pods to run on. Also, kube-scheduler ensures that the Kubernetes cluster is healthy. It identifies where new containers are to be added.

The Kubernetes scheduler looks after the resources that a pod needs, such as CPU or memory, along with the complete health of the K8s cluster. Accordingly, it schedules the pod to an appropriate compute node required by the pod depending upon certain factors including resource requirements, hardware/software/ restrictions, affinity and anti-affinity specifications, inter-workload interference, and much more.

kube-controller-manager

Within the Kubernetes architecture, Kube-controller-manager is the control plane component that runs controller processes. Each controller takes care of running the Kubernetes cluster and the Kube-controller-manager consists of several controller functions like these.

Some types of these controllers are,

  • Node controller: It is responsible for identifying and responding when nodes go down.
  • Job controller:?The task of this component is to watch for Job objects that represent one-off/independent tasks. It then creates Pods for running those tasks to completion.
  • Endpoints controller:?It saves the endpoints object which means it joins the services and pods.
  • Service Account & Token controllers:?It creates default accounts and API access tokens for new namespaces.

No alt text provided for this image

cloud-controller-manager

It is a Kubernetes control plane component that embeds cloud-specific control logic. It allows the Kubernetes cluster to get linked into the cloud provider’s API and separates those components that interact with the cloud platform from components that only interact with the Kubernetes cluster. In simpler words, cloud-controller-manager only runs controllers that are specific to the cloud provider which is being used.

This Kubernetes architecture diagram shows how different parts of a Kubernetes cluster are related to each other.

Node Components

By looking at the Kubernetes architecture explanation, we can clearly see that Kubernetes runs the workload by placing containers into Pods to run on Nodes. After knowing in detail about what are Pods in Kubernetes, let's now look at the components of a node or compute machine.

Here's a brief description of the node components. So, let's take a look...

kubelet

It is a node component that runs on each node in the cluster. It makes sure that containers within a pod are running. But, how is this done? kubelet chooses a set of PodSpecs and ensures that the containers defined in these PodSpecs are running and healthy.

kube-proxy

kube-proxy is a network proxy that runs on each node within a Kubernetes cluster. Each node contains kube-proxy for facilitating Kubernetes networking services. The kube-proxy handles communications inside or outside of the K8s cluster by using the operating system packet filtering layer if it is available or else it forwards the traffic itself.

Container Runtime

Each node has a container runtime engine that is responsible for running the containers. Kubernetes supports many container runtimes such as Docker, containerd, CRI-O, and any implementation of the Kubernetes CRI (Container Runtime Interface).

kubelet, kube-proxy and container runtime are important node components but they can also be present within the master node or the control plane.

No alt text provided for this image

We learn more..!!!

要查看或添加评论,请登录

Ibrahim S的更多文章

  • Git - Interview question

    Git - Interview question

    What is Git, and how does it differ from other version control systems? Answer: Git is an opensource version control…

    1 条评论
  • AWS - EKS

    AWS - EKS

    Amazon Elastic Kubernetes Service (Amazon EKS) is a fully managed Kubernetes service. Kubernetes is open source…

    1 条评论
  • Docker Volume

    Docker Volume

    ??Docker volumes are used for data persistence in Docker. So if we have a database or state full application, we would…

  • Content Creators Need To Avoid on Linkedin Mistakes

    Content Creators Need To Avoid on Linkedin Mistakes

    ?????????????????????? ???????? ????????????????: Your headline is the first thing people see. Craft a compelling and…

  • Kubeflow || SageMaker

    Kubeflow || SageMaker

    Kubeflow and Amazon SageMaker are both popular platforms used in the field of machine learning but they differ in terms…

  • Power of Digital Marketing

    Power of Digital Marketing

    In today's fast-paced digital landscape, businesses must adapt and embrace the power of digital marketing to thrive and…

    1 条评论
  • What is Virus ...?

    What is Virus ...?

    A computer virus is a program or piece of code designed to damage your computer by corrupting system files, wasting…

    1 条评论
  • What Is Infrastructure as Code (IaC)?

    What Is Infrastructure as Code (IaC)?

    Infrastructure-as-Code (IaC) tools automate the management of IT infrastructure using programming languages and…

  • Remote Code Execution Attack (RCE)

    Remote Code Execution Attack (RCE)

    What is an RCE (Remote code execution) attack? It is a bug in a service receiving data from a network port that allows…

  • Active Directory - Azure

    Active Directory - Azure

    Azure Active Directory (Azure AD) is a cloud-based identity and access management service. Azure AD enables employees…

社区洞察

其他会员也浏览了