Cloud Native 12 min read

Master Kubernetes Architecture: From Control Plane to Ecosystem Extensions

This article provides a comprehensive, layer‑by‑layer breakdown of Kubernetes architecture, covering the control plane, node components, application routing, management features, ecosystem tools, networking, storage, observability, and a learning roadmap for practitioners.

Ray's Galactic Tech
Ray's Galactic Tech
Ray's Galactic Tech
Master Kubernetes Architecture: From Control Plane to Ecosystem Extensions

1. Overview of Kubernetes Architecture

Kubernetes (K8s) is a distributed operating system that follows a declarative API + controller pattern. Users describe the desired state of workloads and cluster resources; controllers continuously reconcile the actual state toward that goal, providing automation, scalability, and self‑healing.

2. Five Core Architectural Layers

Control Plane (Core Layer) : The cluster’s brain. It processes all API requests, makes scheduling decisions, stores the entire cluster state, and runs the control loops that enforce the desired state. Key components are kube-apiserver, etcd, kube-scheduler, and kube-controller-manager.

Node Layer (Workload Layer) : The execution arm of the cluster. Each worker node runs a kubelet (node supervisor), kube-proxy (network rule manager), and a container runtime that implements the CRI (e.g., containerd, CRI‑O).

Application & Routing Layer : Defines how applications are packaged and exposed. Core objects are Pods, Deployments/StatefulSets/DaemonSets, Services, and Ingress resources.

Management Layer : Provides automation and security controls such as Role‑Based Access Control (RBAC), Horizontal/Vertical Pod Autoscaling (HPA/VPA), ResourceQuota/LimitRange, and NetworkPolicy.

Interface & Ecosystem Layer : Operational entry points and extensibility mechanisms, including the kubectl CLI, the API server, observability stacks (Prometheus, Grafana), logging/tracing (Loki, Jaeger), service meshes (Istio, Linkerd), and CI/CD tools (Argo CD, Tekton).

3. Control Plane Deep Dive

API Server : The sole entry point for all RESTful operations. It authenticates requests, validates them, and forwards them to the appropriate component.

etcd : A highly available, strongly consistent key‑value store that persists the entire cluster configuration and state.

Scheduler : Watches for newly created Pods, evaluates node suitability, and assigns each Pod to the most appropriate Node.

Controller Manager : Runs a set of built‑in controllers (e.g., Deployment controller, Node controller) that continuously compare the desired state with the observed state and act to reconcile differences.

HA Architecture for the Control Plane

Production clusters typically deploy multiple master nodes behind a load balancer, an odd‑sized etcd cluster (3 or 5 members), and enable leader election for the Scheduler and Controller Manager with the --leader-elect flag.

Control plane HA diagram
Control plane HA diagram

4. Node Layer Components

Kubelet : Runs on every node, registers the node with the API server, and ensures that the containers defined in each Pod are started, stopped, and healthy.

Kube‑proxy : Maintains iptables/ipvs rules that implement Service virtual IPs and load‑balancing across Pods.

Container Runtime (CRI) : Executes container lifecycle operations. Common implementations are containerd and CRI‑O.

5. Scheduler Mechanism and Policies

The scheduling workflow consists of three phases:

Filtering : Discards nodes that lack sufficient CPU/memory, violate node selectors, or break affinity/anti‑affinity rules.

Scoring : Assigns a weight to each remaining node based on factors such as resource balance, topology spread, or custom plugins.

Binding : Binds the Pod to the highest‑scoring node by creating a Binding object.

Common scheduling directives: nodeSelector / nodeAffinity: Constrain Pods to specific node labels or topology. podAffinity / podAntiAffinity: Influence co‑location or separation of Pods based on labels. taints & tolerations: Mark nodes with “taints” that only Pods with matching tolerations may be scheduled onto.

6. Application & Routing Layer

Pod : The smallest deployable unit; a Pod may contain one or more containers that share the same network namespace and optional storage volumes.

Deployment / StatefulSet / DaemonSet : Declarative controllers that manage Pod replica sets, rolling updates, and rollbacks. StatefulSet adds stable network IDs and ordered scaling; DaemonSet ensures one Pod per node.

Service : Provides a stable virtual IP and DNS name for a set of Pods, enabling internal load‑balancing and service discovery.

Ingress : Layer‑7 HTTP/HTTPS routing resource that aggregates multiple Services behind a single external entry point, often backed by an Ingress controller (e.g., Nginx, Traefik).

7. Network Model and Service Communication

CNI Plugins : Implement the Pod network. Popular choices include Flannel (simple overlay), Calico (policy‑aware), and Cilium (eBPF‑based).

Service Types : ClusterIP (internal only), NodePort (exposes a port on each node), LoadBalancer (provisions a cloud provider LB).

Ingress : Manages external HTTP/HTTPS traffic and can terminate TLS.

Typical traffic flow from a client Pod to a target Pod:

Pod → kube-proxy → iptables/ipvs → Service Virtual IP → Destination Pod

8. Storage Layer Design (Volume & CSI)

Volume : A directory accessible to containers in a Pod, defined by the Pod spec.

PersistentVolume (PV) : Cluster‑wide resource that represents a piece of storage provisioned by an administrator.

PersistentVolumeClaim (PVC) : User‑requested storage claim that binds to a matching PV.

StorageClass : Describes how dynamic provisioning should occur (e.g., provisioner, parameters, reclaim policy).

CSI (Container Storage Interface) : Standard plug‑in model that allows third‑party storage drivers to integrate with Kubernetes.

Common implementations:

Development / testing: hostPath, localPath Production: Ceph RBD, NFS, Longhorn, AWS EBS Dynamic provisioning: Create a PVC together with a StorageClass; the control plane automatically creates a matching PV.

9. Management Layer: Automation and Security

RBAC : Role‑Based Access Control defines permissions for users, groups, and service accounts.

HPA / VPA : Horizontal Pod Autoscaler scales the number of Pod replicas based on metrics (CPU, custom metrics); Vertical Pod Autoscaler adjusts container resource requests/limits.

ResourceQuota & LimitRange : Enforce namespace‑level caps on total CPU, memory, number of Pods, etc., and set default request/limit values.

NetworkPolicy : Declarative firewall rules that restrict which Pods may communicate with each other.

10. Interface & Ecosystem Layer

CLI & API : kubectl interacts with the API server; the same REST API can be used programmatically.

Observability : Prometheus scrapes metrics; Grafana visualizes them.

Logging & Tracing : Loki (log aggregation) with Promtail agents; Jaeger for distributed tracing.

Service Mesh : Istio or Linkerd provide traffic management, mutual TLS, and observability at the application layer.

CI/CD Automation : GitOps‑style tools such as Argo CD, Flux, or traditional pipelines (Jenkins, Tekton) continuously deliver manifests.

Certificates & Policy : cert-manager automates TLS certificate issuance; Open Policy Agent (OPA) enforces admission policies.

11. Observability and Maintenance

Monitoring : Collect metrics from Pods, Nodes, the API server, and network components; set alerts via Prometheus Alertmanager.

Log Aggregation : Centralize logs with Loki (or the EFK stack) for searchable access.

Alerting : Integrate with PagerDuty, Opsgenie, or other incident‑response platforms.

Self‑Healing : Controllers and readiness/liveness probes automatically restart failed containers and reschedule Pods.

12. Learning Roadmap

Beginner : Understand Pods, Services, Deployments. Tools: Minikube or Kind.

Intermediate : Work with HPA, Ingress, ConfigMaps, PVCs. Tools: kubeadm, kubectl.

Advanced : Deploy Helm charts, set up monitoring, build CI/CD pipelines, manage Namespaces. Tools: Helm, Argo CD.

Architect : Design multi‑cluster, high‑availability, service‑mesh, and GitOps solutions. Tools: Istio, Flux, Crossplane.

13. Conclusion

Kubernetes embodies a declarative API + controller model: operators declare the desired state, and the control plane continuously works to achieve it. This design makes Kubernetes the foundational technology of the cloud‑native era—a distributed operating system that is automated, scalable, and self‑healing.

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 NativearchitectureKubernetesDevOpsContainers
Ray's Galactic Tech
Written by

Ray's Galactic Tech

Practice together, never alone. We cover programming languages, development tools, learning methods, and pitfall notes. We simplify complex topics, guiding you from beginner to advanced. Weekly practical content—let's grow together!

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.