Kubernetes Architecture
A Kubernetes cluster is composed of two main node types:-
Control Plane Nodes
Hosts the core components that manage cluster state and orchestration:- etcd: Distributed key-value store for all cluster data.
- kube-apiserver: Central API endpoint for administrative operations.
- kube-controller-manager: Runs controllers to reconcile desired vs. actual state.
- kube-scheduler: Assigns Pods to Nodes based on resource requirements.
-
Worker Nodes
Runs application workloads and contains:- kubelet: Ensures containers in Pods are healthy and running.
- kube-proxy: Configures network routes and load balancing for Services.
- Container runtime (e.g., Docker, containerd).

Pods
A Pod is the smallest deployable unit in Kubernetes, encapsulating one or more containers that share networking and storage. Containers within a Pod communicate overlocalhost and share volume mounts.
Example Pod manifest:
By default, Pods use
restartPolicy: Always. While containers will restart on failure, if the Pod object is deleted or its Node fails, Kubernetes will not recreate it unless managed by a higher-level controller (see Deployments).Controllers: ReplicaSets & Deployments
Controllers ensure your Pods maintain the desired state and scale automatically.| Controller | Purpose | Definition Example |
|---|---|---|
| ReplicaSet | Maintains a specified number of identical Pods. | kind: ReplicaSet |
| Deployment | Declarative updates, rollbacks, and scaling of Pods. | kind: Deployment |
Services
Services provide stable network endpoints for Pods, decoupling clients from dynamically assigned Pod IPs. Kubernetes supports several Service types:| Type | Description | Use Case |
|---|---|---|
| ClusterIP | Internal-only cluster IP (default). | In-cluster communication. |
| NodePort | Exposes Service on each Node’s IP at a static port. | Simple external access on known port. |
| LoadBalancer | Provisions cloud provider LB to route traffic externally. | Production-grade external access. |
LoadBalancer Services may incur additional cloud provider costs. To consolidate routing for multiple hostnames or paths under a single IP, consider using an Ingress resource.