9.1 · What Kubernetes actually is
Definition. Kubernetes (often k8s — eight letters between k and s) is an open-source container orchestrator that exposes a declarative REST API: you submit a desired state, a set of controllers continuously reconciles the cluster toward it. Google open-sourced the project in June 2014, drawing on a decade of internal experience with Borg and its successor Omega; it was the first project ever to graduate at the CNCF (March 2018). Current stable line is
| Year | Milestone | Why it matters |
|---|---|---|
| 2003 | Google Borg starts | Cell-based cluster manager — the intellectual ancestor. |
| 2014 | K8s v0.1 open-sourced | Joe Beda, Brendan Burns, Craig McLuckie at Google. |
| 2015 | v1.0 + CNCF founded | K8s is the seed project; Linux Foundation neutral home. |
| 2018 | CNCF graduation | First graduated project; "boring" production-ready. |
| 2020 | Dockershim deprecated | CRI-only — containerd / CRI-O win the runtime slot. |
9.2 · Control plane & node components
A cluster is split into a control plane (the brain) and one-or-more nodes (the muscles). Every action flows through the API server.
| Plane | Component | Role |
|---|---|---|
| Control | kube-apiserver | Stateless REST front-end; only component that talks to etcd. |
| etcd | Distributed key-value store (Raft). Single source of truth. | |
| kube-scheduler / -controller-manager | Picks nodes for Pods; runs core controllers (Deployment, Node, SA…). | |
| cloud-controller-manager | Cloud-specific: load balancers, node lifecycle, routes, volumes. | |
| Node | kubelet | Per-node agent; talks to runtime via CRI, reports pod status. |
| kube-proxy | Programs iptables / IPVS / nftables for Service VIPs (eBPF in Cilium). | |
| CRI runtime | containerd (EKS/GKE/AKS) or CRI-O (OpenShift) → runc / crun. |
9.3 · Workload primitives — the full table
| Kind | What it is | When to use |
|---|---|---|
| Pod | Smallest deployable unit: one-or-more containers sharing net + IPC + volumes. | Almost never created directly — always via a controller. |
| ReplicaSet | Keeps N identical Pods running. | Implementation detail of Deployment. |
| Deployment | Declarative ReplicaSet w/ rolling updates & rollback. | Stateless services — the default workload. |
| StatefulSet | Stable identity (web-0, web-1), ordered rollout, per-pod PVC. | Databases, brokers — anything needing identity. |
| DaemonSet | One Pod per node (or per matching node). | Log shippers, CNI agents, node exporters. |
| Job | Run to completion; retries on failure. | Migrations, batch ETL. |
| CronJob | Job on a schedule (cron syntax). | Nightly reports, cleanup. |
| ReplicationController | Pre-1.0 predecessor of ReplicaSet. | Do not start new clusters with it. |
9.4 · Service primitives
A Service is a stable virtual IP + DNS name in front of a churning set of Pods. The endpoints controller writes EndpointSlice objects (replaces Endpoints at scale, GA in v1.21).
| Type | What it does | Backed by |
|---|---|---|
| ClusterIP | Internal VIP only. | kube-proxy / Cilium. |
| NodePort | Opens port 30000–32767 on every node. | iptables/IPVS rules. |
| LoadBalancer | Provisions a cloud LB (ELB/ALB, GCLB, Azure LB). | cloud-controller-manager. |
| ExternalName | CNAME alias to an external host. | CoreDNS. |
Headless (clusterIP: None) | DNS returns Pod IPs directly — no VIP. | StatefulSet workloads. |
| Ingress | HTTP/S routing by host/path. Controllers: NGINX, HAProxy, Traefik, Istio, Contour. | L7 proxy. |
| Gateway API | Role-oriented (Infra/Cluster/App), expressive, multi-protocol replacement for Ingress. | Envoy Gateway, Istio, Kong, Cilium. |
9.5 · Config & storage
- ConfigMap / Secret — key/value config mounted as env or files. Secrets are base64, not encrypted (turn on KMS provider via EncryptionConfiguration).
- PV / PVC / StorageClass — cluster volume + Pod claim + dynamic-provisioner template (e.g.
gp3,premium-rwo). - CSI — Container Storage Interface; only supported volume plugin model since v1.21. Snapshots GA v1.20.
9.6 · Networking — CNI plugins
The Kubernetes networking model demands flat L3: every Pod gets a routable IP, every Pod can reach every other Pod without NAT. A CNI (Container Network Interface, spec v1.0.0 2022) plugin makes that happen.
| CNI | Dataplane | Notable features |
|---|---|---|
| Calico (Tigera) | BGP / VXLAN / eBPF | Mature NetworkPolicy, optional eBPF mode. |
| Cilium (Isovalent → Cisco; CNCF graduated Oct 2023) | eBPF | L3-L7 policy, Hubble observability, kube-proxy replacement, Gateway API. |
| Flannel | VXLAN overlay | Simplest; no NetworkPolicy. |
| Weave Net | VXLAN | End-of-life since Mar 2024. |
| AWS VPC CNI | ENIs & secondary IPs | Pod IPs are VPC IPs — native routing, security-group support. |
| Azure CNI | VNet IPs or overlay | Cilium-powered "Azure CNI Overlay" since 2024. |
| GKE Dataplane v2 | eBPF (Cilium) | Default for new GKE clusters since 2021. |
9.7 · Autoscaling — four axes
- HPA — Horizontal Pod Autoscaler: replicas on CPU/mem/custom metrics (
autoscaling/v2GA v1.23). - VPA — Vertical Pod Autoscaler: recommend or auto-resize requests/limits.
- KEDA — event-driven scaling (Kafka lag, queue depth, cron, 60+ scalers); scales to zero. CNCF graduated Aug 2023.
- Cluster Autoscaler — adds/removes nodes from cloud node-groups when Pods can't schedule.
- Karpenter — AWS-origin (donated to CNCF Nov 2023); JIT, instance-type-aware; replaces CA on EKS.
- Goldilocks — Fairwinds dashboard over VPA recommendations.
9.8 · Operators & CRDs
Definition. An Operator is a custom controller plus a CustomResourceDefinition (CRD) that encodes operational knowledge for a specific app (e.g. "how to fail over Postgres"). Pattern coined by CoreOS in November 2016.
SDKs: Operator SDK (Go/Ansible/Helm — OpenShift world), Kubebuilder (Go, upstream-blessed), kopf (Python), Metacontroller (webhook-based, any language).
Famous operators in 2026:
9.9 · Packaging — Helm vs Kustomize vs Carvel vs Jsonnet
| Tool | Approach | Strengths | Weaknesses |
|---|---|---|---|
| Helm 3 | Go templating + values.yaml | Largest chart ecosystem (Artifact Hub), OCI registries. | YAML-in-string templating is error-prone. |
| Kustomize | Overlay / patch (no templating) | Native in kubectl -k since v1.14; readable diffs. | No parameterisation for complex apps. |
| Carvel (ytt, kapp, kbld) | YAML-aware templating + dependency-aware apply | Strong typing, sandboxed templating. | Smaller community. |
| Jsonnet (Tanka, kubecfg) | Real DSL, functions, inheritance | Best for large mono-repos (Grafana Labs use it). | Learning curve. |
| cdk8s | TS / Python / Go → YAML | Real language, IDE support. | Build step in the loop. |
9.10 · Distros & managed offerings
- Managed (cloud): EKS (AWS, 2018), GKE (Google, 2015 — Autopilot 2021), AKS (Azure, 2018). EKS now charges $0.10/h control plane.
- Enterprise distros: OpenShift (Red Hat / OKD), Rancher (SUSE), VMware Tanzu, Mirantis MKE.
- Lightweight / edge: K3s, K0s, MicroK8s, Talos Linux (immutable, API-driven OS).
- Local / CI: kubeadm, Kind (Docker-in-Docker), k3d, minikube.
9.11 · Security baselines
Pod Security Standards (PSS) replaced PodSecurityPolicy in v1.25 (Aug 2022): three profiles — Privileged (allow all, for CNI/CSI), Baseline (no hostNet/PID, no privileged, no dangerous caps), Restricted (no runAsRoot, no privilege-escalation, drop all caps except NET_BIND_SERVICE, seccomp=RuntimeDefault).
- RBAC — Roles & ClusterRoles with verbs (get/list/watch/create/update/patch/delete) on resources.
- ServiceAccount tokens — projected, audience-scoped, time-bound (BoundServiceAccountTokenVolume GA v1.22).
- NetworkPolicy — default-deny ingress/egress, then explicitly allow. Cilium adds L7 (HTTP/gRPC/Kafka) rules.
- Admission control — Validating/Mutating webhooks; policy engines Kyverno (CNCF graduated Nov 2024) and OPA Gatekeeper.
- Image & supply chain — Sigstore
cosignverify-attestations via admission (e.g. Connaisseur, Kyverno verifyImages).
9.12 · Observability for K8s
- metrics-server — lightweight, in-memory; powers
kubectl topand HPA. - kube-state-metrics (KSM) — emits the state of objects (Deployments, Pods, Jobs) as Prometheus metrics.
- kube-prometheus-stack — the canonical Helm chart bundling Prometheus Operator, Alertmanager, Grafana, KSM, node-exporter.
- OpenTelemetry Operator — auto-instruments workloads & runs OTel Collector as a DaemonSet/sidecar.