Skip to content

Docker - Kubernetes Architecture

Docker - Introduction to Kubernetes Architecture

Section titled “Docker - Introduction to Kubernetes Architecture”

Kubernetes (often abbreviated as K8s) is a powerful open-source system for automating deployment, scaling, and management of containerized applications. While Docker provides the container runtime, Kubernetes orchestrates these containers across a cluster of machines.

Think of Docker as building the standardized shipping containers (your application images) and Kubernetes as the global shipping logistics system (managing where and how those containers run at scale).

A Kubernetes cluster consists of two main types of components:

  • Control Plane (formerly Master Node): Manages the overall cluster state. It makes global decisions about the cluster (e.g., scheduling applications) and detects and responds to cluster events.
  • Worker Nodes (formerly Minions): These are the machines (VMs or physical servers) where your containerized applications actually run.

The Control Plane components typically run on dedicated machines, while Worker Nodes host the application workloads.

  • kube-apiserver: The front-end for the Kubernetes control plane. It exposes the Kubernetes API, which is used by users, management tools, and other cluster components to interact.
  • etcd: A consistent and highly-available key-value store used as Kubernetes’ backing store for all cluster data (state, configuration, etc.).
  • kube-scheduler: Watches for newly created Pods (the smallest deployable units in Kubernetes, often containing one or more containers) with no assigned node, and selects a node for them to run on based on resource requirements, policies, etc.
  • kube-controller-manager: Runs controller processes that regulate the state of the cluster. Examples include the Node controller (handling node failures), Replication controller (maintaining the correct number of Pods), etc.
  • cloud-controller-manager (Optional): Interacts with the underlying cloud provider’s API (e.g., for managing load balancers or storage).
  • kubelet: An agent that runs on each worker node. It ensures that containers described in PodSpecs (provided by the API server) are running and healthy.
  • kube-proxy: A network proxy that runs on each node, maintaining network rules and enabling network communication to Pods from network sessions inside or outside of the cluster.
  • Container Runtime: The software responsible for running containers. Docker is a popular choice, but Kubernetes also supports other runtimes like containerd and CRI-O.
  • Pods: The smallest deployable unit, representing a single instance of a running process in your cluster. Pods contain one or more containers (like Docker containers) that share storage and network resources.
  • Services: An abstract way to expose an application running on a set of Pods as a network service. Provides a stable IP address and DNS name for accessing the Pods.
  • Deployments: A declarative way to manage Pods and ReplicaSets (which ensure a specified number of Pod replicas are running). Handles rolling updates and rollbacks.
  • Namespaces: Provide a way to partition cluster resources between multiple users or teams.

Kubernetes orchestrates these components to provide a resilient, scalable platform for running containerized applications defined via Docker images.