Cloud Native 6 min read

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.

mikechen
mikechen
mikechen
Kubernetes Architecture Deep Dive: Master-Node Components & Workflow

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.

Kubernetes architecture overview
Kubernetes architecture overview
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:

Master node components
Master node 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.

API Server details
API Server details

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.

Controller Manager
Controller Manager

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:

Node components
Node 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.

Kubelet details
Kubelet details

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).

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Cloud NativeKubernetesK8sAPI ServeretcdKubeletContainer OrchestrationMaster-Node Architecture
mikechen
Written by

mikechen

Over a decade of BAT architecture experience, shared generously!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.