☸️ Kubernetes Q2 / 20

What are the main components of Kubernetes architecture?

AI-Powered Answer ✓ Answered

Kubernetes orchestrates containerized applications across a cluster of machines. Its architecture is designed to be robust and scalable, divided into a Control Plane (master node) and Worker Nodes, each comprising several key components that work together to manage and run workloads.

Control Plane Components (Master Node)

The Control Plane is the brain of the Kubernetes cluster, responsible for maintaining the desired state of the cluster, managing resources, and orchestrating operations. These components can run on a single master node or be distributed across multiple nodes for high availability.

  • Kube-API Server: The frontend for the Kubernetes control plane. It exposes the Kubernetes API and is the central hub for all communication within the cluster, allowing users and other components to interact with the cluster.
  • etcd: A consistent and highly available key-value store used as Kubernetes' backing store for all cluster data. All cluster configuration, state, and metadata are stored here.
  • Kube-Scheduler: Watches for newly created Pods with no assigned node, and selects an optimal node for them to run on, considering resource requirements, hardware/software/policy constraints, affinity and anti-affinity specifications.
  • Kube-Controller-Manager: Runs various controller processes that regulate the state of the cluster. These controllers include Node Controller, Replication Controller, Endpoints Controller, and Service Account & Token Controllers, ensuring that the desired state matches the current state.

Worker Node Components

Worker nodes (also known as minion nodes) are the machines where containerized applications run. Each worker node in a Kubernetes cluster runs the following essential components:

  • Kubelet: An agent that runs on each node in the cluster. It ensures that containers are running in a Pod as specified by the PodSpec. It registers the node with the API server and reports its status.
  • Kube-Proxy: A network proxy that runs on each node and maintains network rules on nodes. These rules allow network communication to your Pods from inside or outside of the cluster, handling service discovery and load balancing for Pods.
  • Container Runtime: The software responsible for running containers. Kubernetes supports runtimes such as Docker, containerd, and CRI-O, which implements the Kubernetes Container Runtime Interface (CRI).