Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 2.98 KB

architecture.md

File metadata and controls

33 lines (19 loc) · 2.98 KB

Kubernetes Architecture

  • Kubernetes follows a client-server architecture and consists of various components working together to provide container orchestration. Understanding the architecture helps in comprehending how Kubernetes manages and operates containerized applications effectively.

High-Level Overview

  • At a high level, Kubernetes architecture comprises two main components:

  • Control Plane (Master): The control plane, also known as the master, manages and controls the Kubernetes cluster. It oversees the overall state of the cluster, making decisions about scheduling, scaling, and maintaining desired state.

  • Worker Nodes: Worker nodes, also referred to as worker machines or minions, are responsible for running containers and executing workloads. They receive instructions from the control plane and ensure the requested resources are provisioned and managed.

Control Plane Components

  • The control plane consists of the following core components:

  • API Server: The API server acts as the front-end for the control plane and exposes the Kubernetes API. It handles requests from users, controllers, and other components, validating and processing them.

  • etcd: etcd is a distributed key-value store that serves as the cluster's primary datastore. It stores the configuration data, cluster state, and metadata required by the control plane components.

  • Scheduler: The scheduler is responsible for assigning workloads (pods) to available worker nodes. It considers factors such as resource requirements, affinity, anti-affinity, and other policies when making scheduling decisions.

  • Controller Manager: The controller manager includes several controllers that monitor the cluster's state and make necessary adjustments to maintain the desired state. Examples of controllers include the replication controller, node controller, and service controller.

Worker Node Components

  • Each worker node in the Kubernetes cluster runs the following components:

  • Kubelet: The kubelet is responsible for managing the pods on a worker node. It ensures that the containers specified in a pod's manifest are running and healthy. The kubelet interacts with the control plane to receive instructions and report the status of the node and its pods.

  • Container Runtime: The container runtime is responsible for pulling container images and running containers. Kubernetes supports various container runtimes like Docker, containerd, and CRI-O.

  • Kube Proxy: The kube-proxy is a network proxy that runs on each worker node. It manages network connectivity for services by implementing the Kubernetes service abstraction. It enables load balancing and routing traffic to the appropriate pods.

Understanding the roles and responsibilities of these components is crucial for comprehending how Kubernetes operates and manages the cluster effectively.

For more detailed information on Kubernetes architecture, you can refer to the official Kubernetes documentation.