Skip to content

Cluster Architecture & Kubectl

Kubernetes operates on a distributed master-worker architecture designed for high availability, fault tolerance, declarative state management, and seamless scaling.


A Kubernetes cluster consists of two distinct operational tiers:

  1. The Control Plane (Master Nodes): Maintains desired state, evaluates scheduling requirements, detects host failures, and exposes the cluster API.
  2. Worker Nodes (Data Plane): The physical or virtual servers that execute containerized workloads with compute, memory, storage, and networking resources.
┌────────────────────────────────────────────────────────────────────────┐
│ CONTROL PLANE (MASTER) │
│ │
│ ┌─────────────────┐ ┌─────────────────┐ ┌───────────────┐ │
│ │ kube-scheduler │◄────►│ kube-apiserver │◄───►│ controller- │ │
│ │ │ │ (Port 6443) │ │ manager │ │
│ └─────────────────┘ └────────┬────────┘ └───────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────┐ │
│ │ etcd │ │
│ │ (Port 2379) │ │
│ └─────────────┘ │
└─────────────────────────────────────┬──────────────────────────────────┘
│ Secure TLS / mTLS
┌───────────────────────┴───────────────────────┐
▼ ▼
┌───────────────────────────┐ ┌───────────────────────────┐
│ WORKER NODE 1 │ │ WORKER NODE 2 │
│ │ │ │
│ ┌─────────────────────┐ │ │ ┌─────────────────────┐ │
│ │ kubelet │ │ │ │ kubelet │ │
│ │ (Port 10250) │ │ │ │ (Port 10250) │ │
│ └──────────┬──────────┘ │ │ └──────────┬──────────┘ │
│ │ CRI │ │ │ CRI │
│ ┌──────────▼──────────┐ │ │ ┌──────────▼──────────┐ │
│ │ Container Runtime │ │ │ │ Container Runtime │ │
│ │ (containerd / CRI-O)│ │ │ │ (containerd / CRI-O)│ │
│ └──────────┬──────────┘ │ │ └──────────┬──────────┘ │
│ │ │ │ │ │
│ ┌──────────▼──────────┐ │ │ ┌──────────▼──────────┐ │
│ │ Pod 1 │ Pod 2 │ │ │ │ Pod 3 │ Pod 4 │ │
│ └─────────────────────┘ │ │ └─────────────────────┘ │
│ │ │ │
│ ┌─────────────────────┐ │ │ ┌─────────────────────┐ │
│ │ kube-proxy │ │ │ │ kube-proxy │ │
│ │ (iptables / IPVS) │ │ │ │ (iptables / IPVS) │ │
│ └─────────────────────┘ │ │ └─────────────────────┘ │
└───────────────────────────┘ └───────────────────────────┘

  • kube-apiserver (Port 6443): Central communication hub exposing the JSON/Protobuf REST API over HTTPS. Handles authentication, authorization (RBAC), and admission control. Only component with direct access to etcd.
  • etcd (Port 2379/2380): Distributed key-value store implementing the Raft consensus algorithm. Persists the complete declarative state and runtime status of every object in the cluster.
  • kube-scheduler (Port 10259): Analyzes resource requirements, affinity/anti-affinity specifications, and node constraints to bind unscheduled Pods to suitable Worker Nodes.
  • kube-controller-manager (Port 10257): Executes continuous background loops reconciling actual cluster state with desired state (NodeController, DeploymentController, EndpointSliceController).
  • cloud-controller-manager: Connects cloud-provider APIs for provisioning cloud load balancers, VPC routing, and storage volumes.

  • kubelet (Port 10250): System agent running on every node. Communicates with kube-apiserver to register the node, monitor assigned Pods, invoke the container runtime via CRI, and report health status.
  • kube-proxy (Port 10256): Manages host networking rules using iptables or IPVS to route cluster-internal Service virtual IPs (ClusterIP) to target Pod endpoints.
  • Container Runtime: Low-level engine (such as containerd or CRI-O) responsible for pulling images and launching container cgroups and namespaces.

kubectl reads credentials from ~/.kube/config to send authenticated REST requests to the API Server.

Terminal window
# Test cluster connectivity
kubectl cluster-info
# View cluster nodes and health status
kubectl get nodes -o wide
# View all running resources across the cluster
kubectl get all -A