Kubernetes Architecture Deep Dive: Master-Node Components & Workflow
This article explains Kubernetes architecture, covering the master-node model, core components like API server, etcd, scheduler, controller manager, kubelet, and kube-proxy, and how they coordinate to deploy and manage containerized applications.
What is Kubernetes?
Kubernetes (K8s) is an open-source container orchestration system originally developed by Google. It automates deployment, scaling, load balancing, and management of containerized applications.
Core Features
Automated Deployment: Supports rolling updates, blue-green deployments, and canary releases.
Elastic Scaling: Automatically adjusts the number of container instances based on load.
Service Discovery & Load Balancing: Built-in DNS and load balancing mechanisms.
High Availability: Supports multi-node clusters with automatic failure recovery.
Rich Ecosystem: Integrates seamlessly with microservice frameworks such as Spring Cloud Alibaba.
Kubernetes Architecture
Kubernetes follows a Master-Node (master-worker) architecture composed of a set of core components.
User -> API Server -> Controller Manager / Scheduler -> Node (Kubelet + KubeProxy)Master Node Components
The master node runs the control plane and includes the following core components:
kube-apiserver
The single entry point for the entire cluster. It exposes a RESTful API, receives and processes all operational requests, and serves as the communication hub for all components.
Key points: RESTful interface, authentication and authorization (RBAC), final persistence layer to etcd. High availability is achieved by running multiple instances behind a load balancer or virtual IP.
etcd
A highly available distributed key-value store that persists all cluster state and configuration data, ensuring consistency and durability.
Key points: Strong consistency via the Raft protocol; backup and recovery strategies are critical; disk and network latency significantly impact cluster performance. HA deployment uses an odd number of nodes (3, 5, or 7) with careful capacity planning.
kube-controller-manager
Runs a collection of controllers (node controller, replication controller, endpoints controller, etc.) that continuously reconcile the actual cluster state with the desired state.
Each controller watches API Server objects and takes corrective actions. The manager runs as a single process but can achieve HA through leader election.
kube-scheduler
Assigns pending Pods to suitable Nodes based on resource requirements, affinity/anti-affinity rules, taints and tolerations, and topology constraints.
The scheduling decision occurs in two phases: Filter (predicates) to eliminate ineligible nodes, and Score (priorities) to rank the remaining nodes. Custom scheduling policies and extensions are supported.
Node (Worker) Components
Node nodes are the workers that run containers and applications. Primary components:
kubelet
An agent running on each Node, responsible for managing the Pod lifecycle on that machine. It receives desired state from the API Server, starts and monitors containers, and reports status back.
Key responsibilities: managing the container runtime (containerd, CRI-O, etc.), health checks, volume mounting, and resource metrics collection. If communication with the API Server is lost, the kubelet attempts to maintain existing Pods locally.
kube-proxy
Runs on each Node to implement service discovery and load balancing by managing network rules (iptables/IPVS) so that cluster-internal and external traffic is correctly routed to the appropriate Pods.
Container Runtime
The software that actually starts and manages containers on the Node (e.g., Docker, containerd). Kubernetes interacts with the runtime via the Container Runtime Interface (CRI).
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.
