Home  K8s   Kubernetes ...

Kubernetes (k8s) architecture

Kubernetes (k8s) architecture is designed to provide a robust, scalable, and portable way to manage containerized workloads and services. It includes several key components, each with a specific role in managing the lifecycle of applications. Here is an overview of the Kubernetes architecture:

High-Level Architecture

  1. Control Plane: Manages the overall state of the cluster.
  2. Node (Worker Node): Runs containerized applications.

Components of the Control Plane

  1. API Server (kube-apiserver):

    • Serves the Kubernetes API, which is the entry point for all administrative tasks.
    • Acts as the front-end of the Kubernetes control plane.
    • Validates and configures data for API objects, including pods, services, and controllers.
    • All components interact with the API server to maintain the desired state of the cluster.
  2. etcd:

    • A consistent and highly-available key-value store used as Kubernetes' backing store for all cluster data.
    • Stores configuration data, state data, and metadata about the cluster.
    • Supports leader election and ensures the high availability of the cluster's data.
  3. Controller Manager (kube-controller-manager):

    • Runs controller processes that handle routine tasks to regulate the state of the cluster.
    • Includes several controllers, such as Node Controller, Replication Controller, Endpoints Controller, and Service Account & Token Controllers.
    • Ensures that the desired state matches the current state by responding to changes.
  4. Scheduler (kube-scheduler):

    • Assigns nodes to newly created pods based on resource availability and other scheduling policies.
    • Monitors resource usage and allocates work to appropriate nodes.
  5. Cloud Controller Manager:

    • Integrates with underlying cloud providers to manage cloud-specific resources.
    • Handles cloud provider-specific control loops, such as managing load balancers and persistent storage.

Components of the Worker Node

  1. Kubelet:

    • An agent that runs on each worker node.
    • Ensures containers are running in a Pod by interacting with the container runtime (like Docker or containerd).
    • Registers the node with the Kubernetes cluster and communicates with the API server.
  2. Kube-proxy:

    • A network proxy that runs on each worker node.
    • Manages networking rules to allow communication to and from Pods.
    • Implements service networking, ensuring that services are accessible within the cluster.
  3. Container Runtime:

    • Responsible for running containerized applications.
    • Common container runtimes include Docker, containerd, and CRI-O.
  4. Pods:

    • The smallest and simplest Kubernetes object.
    • Encapsulates one or more containers that share storage, network, and a specification for how to run the containers.

Kubernetes Node Components

Each node in a Kubernetes cluster contains the services necessary to run Pods and is managed by the control plane. The components on a node include:

Published on: Jul 03, 2024, 06:28 AM  
 Updated on: Jul 03, 2024, 06:29 AM

Comments

Add your comment