Mastering Kubernetes: Complete Architecture, Principles, and Components Explained
This article provides a comprehensive technical overview of Kubernetes, covering its core problems, master‑worker architecture, essential components such as API server, etcd, scheduler, controller manager, kubelet, kube-proxy, container runtimes, and a step‑by‑step deployment workflow, illustrated with diagrams.
What is Kubernetes?
Kubernetes (K8S) is an open‑source container orchestration platform that automates the deployment, scaling, and management of containerized applications. It was originally open‑sourced by Google and is now maintained by the Cloud Native Computing Foundation (CNCF).
Problems Solved by Kubernetes
Container scheduling: efficiently allocate resources across multiple nodes and containers.
Application lifecycle management: automate deployment, upgrade, rollback, restart, and destruction.
High availability and self‑healing: automatically migrate and recover from node or container failures.
Elastic scaling: automatically scale out or in based on workload demand.
Kubernetes Architecture
Kubernetes uses a master‑worker (control plane‑node) distributed architecture.
┌───────────────────┐
│ControlPlane│
│ API Server │
│ Scheduler │
│ControllerManager│
│ etcd │
└─────────▲─────────┘
│
┌─────────┴─────────┐
│WorkerNode│
│ kubelet │
│ kube-proxy│
│ ContainerRuntime│
│ Pods │
└───────────────────┘Control Plane Components
The control plane is responsible for global management and decision‑making, typically running on one or more master nodes. Key components include:
kube-apiserver : the unified API entry point; handles authentication, authorization, auditing, and persists resources to etcd.
etcd : a distributed key‑value store that holds the entire cluster state with strong consistency guarantees.
kube-scheduler : assigns newly created Pods to suitable Nodes based on resource requests, affinity rules, and constraints.
kube-controller-manager : runs various controllers (e.g., Deployment, ReplicaSet, Node controller) that continuously reconcile the actual state toward the desired state.
Node Plane Components
Each worker node runs the following components to host container workloads:
kubelet : manages the lifecycle of Pods on its node, reports status to the API server, and ensures containers are running as specified.
kube-proxy : implements network rules for Services, providing load‑balancing and network connectivity between Pods and external clients.
Container Runtime : pulls images and runs containers; common runtimes include containerd, CRI‑O, and Docker (via the CRI).
Kubernetes Workflow
The typical deployment process proceeds as follows:
User submits a Deployment YAML manifest.
API Server validates the manifest and writes it to etcd.
The Deployment controller creates a ReplicaSet.
The ReplicaSet creates Pods.
The Scheduler selects an appropriate Node for each Pod.
Kubelet on the chosen Node pulls the container image and starts the containers.
Kube-proxy configures the necessary network rules for Service exposure.
The application becomes reachable through its Service.
Mike Chen's Internet Architecture
Over ten years of BAT architecture experience, shared generously!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
