top of page

Kubernetes Architecture

Kubernetes, often abbreviated as K8s (since there are 8 letters between 'K' and 's' in Kubernetes), is an open-source container orchestration platform. It automates the deployment, scaling, and management of containerized applications.

Kubernetes Components

Kubernetes is composed of a number of components, each of which plays a specific role in the overall system. These components can be divided into two categories:
  • nodes: Each Kubernetes cluster requires at least one worker node, which is a collection of worker machines that make up the nodes where our container will be deployed.

  • Control plane: The worker nodes and any pods contained within them will be under the control plane. 




The architecture of Kubernetes is designed to be highly scalable, resilient, and extensible. Here's an overview of its architecture:




1. Master Node Components:
  • API Server: The API server acts as the primary management point for the entire Kubernetes cluster. It serves as the frontend for the Kubernetes control plane and exposes the Kubernetes API, which clients use to interact with the cluster. The API server is responsible for authentication, authorization, validation, and admission control for all API requests.

  • Scheduler: The scheduler is responsible for making decisions about where to place newly created pods in the cluster. It evaluates various factors such as resource requirements, quality of service requirements, affinity and anti-affinity rules, and hardware or software constraints to ensure optimal resource utilization and high availability.

  • Controller Manager: The controller manager is a collection of control loops that watch the state of the cluster through the API server and take action to ensure that the actual state matches the desired state. Each controller manages a specific aspect of the cluster, such as replication, endpoints, service accounts, and nodes.

  • etcd: etcd is a distributed key-value store that serves as the source of truth for all cluster data. It stores configuration data, state information, and metadata about the cluster, including object specifications, API objects, and runtime state. etcd provides strong consistency guarantees and is crucial for maintaining the cluster's overall health and stability.

2. Worker Node Components:
  • Kubelet: The kubelet is an agent that runs on each worker node and is responsible for managing the lifecycle of pods. It receives pod specifications from the API server, ensures that the necessary containers are running inside the pods, and reports node status and resource usage back to the control plane.

  • Container Runtime: The container runtime is the software responsible for running containers within pods. Kubernetes supports multiple container runtimes, including Docker, containerd, and CRI-O. The container runtime pulls container images from registries, creates and manages container lifecycles, and provides isolation and resource allocation mechanisms.

  • Kube Proxy: Kube Proxy is a network proxy that runs on each node and implements Kubernetes networking concepts such as service discovery, load balancing, and network policies. It maintains network rules and forwards traffic to the appropriate destination pods based on service definitions and selectors.





3. Networking and Services:
  • Networking: Kubernetes networking enables communication between pods, services, and external clients. Each pod gets its own IP address, and pods can communicate with each other directly across nodes using overlay networks or other networking plugins. Kubernetes networking also supports network policies for controlling traffic flow and enforcing security policies.

  • Services: Services provide a stable endpoint for accessing a set of pods in the cluster. They abstract away the details of individual pod IP addresses and provide load balancing and service discovery capabilities. Kubernetes supports various types of services, including ClusterIP, NodePort, LoadBalancer, and ExternalName, to meet different networking requirements.

4. Other Key Concepts:
  • Pods: Pods are the smallest deployable units in Kubernetes and represent one or more containers that share the same network namespace, IP address, and storage volumes. Pods are ephemeral and can be created, destroyed, or rescheduled dynamically by Kubernetes based on workload requirements.

  • Deployments: Deployments provide a declarative way to manage the lifecycle of replicated applications in the cluster. They define desired state, such as the number of replicas, update strategy, and rolling update parameters, and Kubernetes ensures that the actual state matches the desired state over time.

  • Volumes: Volumes provide persistent storage for containers running within pods. Kubernetes supports a variety of volume types, including emptyDir, hostPath, persistentVolumeClaim, and cloud provider-specific volumes, to enable data persistence and sharing between containers.

In summary, Kubernetes architecture is designed to be modular, scalable, and extensible, enabling organizations to build and operate containerized applications efficiently and reliably across diverse infrastructure environments. Its robust control plane and rich set of features make it a popular choice for container orchestration and management in both on-premises and cloud-native environments.
bottom of page