Kubernetes (K8s) & AKS
What it is & where it is used
Kubernetes is an open-source container orchestration platform: you declare the desired state (e.g. "run 3 replicas of shop-api:1.4, expose them on port 80"), and Kubernetes continuously makes the actual state match — scheduling containers onto machines, restarting failed ones, scaling, rolling out updates and load balancing.
Created at Google (inspired by its internal Borg system), open-sourced in 2014, donated to the CNCF (Cloud Native Computing Foundation) in 2015. "K8s" = K + 8 letters + s.
Managed offerings: AKS (Azure Kubernetes Service), EKS (AWS), GKE (Google). Local: kind, minikube, k3d, Docker Desktop's Kubernetes.
What Kubernetes gives you: self-healing, horizontal scaling, service discovery and load balancing, rolling updates and rollbacks, config and secret management, storage orchestration, batch jobs, and an extensible API (CRDs and operators).
Versions & history
| Version | Year | Notable |
|---|---|---|
| 1.0 | Jul 2015 | First stable release; CNCF formed |
| 1.2–1.6 | 2016–2017 | Deployments, ConfigMaps, DaemonSets, StatefulSets (1.5 beta → 1.9 GA), RBAC (1.6 beta, GA 1.8) |
| 1.7–1.16 | 2017–2019 | CRDs, CSI storage, Ingress v1beta1, CoreDNS default (1.13) |
| 1.19 | 2020 | Ingress networking.k8s.io/v1 GA; support window extended to 1 year |
| 1.20 | 2020 | Dockershim deprecated |
| 1.24 | May 2022 | Dockershim removed (containerd/CRI-O) |
| 1.25 | 2022 | PodSecurityPolicy removed → Pod Security Admission |
| 1.27–1.30 | 2023–2024 | In-place pod resize (alpha), sidecar containers (beta 1.29), Gateway API v1.0 (separate project) |
| 1.31–1.34 | 2024–2025 | Sidecars GA (1.33), in-place pod resize beta, Dynamic Resource Allocation for GPUs (GA 1.34) |
Kubernetes releases three minor versions per year, each supported upstream for about 14 months (≈ the three latest minors). AKS supports roughly the latest three GA minor versions (plus Long-Term Support for selected versions on Premium tier) — clusters must be upgraded regularly.
Lifecycle
Pod lifecycle phases: Pending (accepted, waiting for scheduling/image pull) → Running (bound to a node, at least one container running) → Succeeded (all containers exited 0 — Jobs) or Failed (a container exited non-zero and won't restart) — plus Unknown (node unreachable).
Container states: Waiting (e.g. ContainerCreating, ImagePullBackOff, CrashLoopBackOff), Running, Terminated.
Pod startup sequence: scheduler picks a node → kubelet pulls images → init containers run in order to completion → app containers (and sidecars) start → postStart hook → startup probe → readiness probe passes → pod added to Service endpoints → liveness probe keeps checking.
Pod termination: pod marked Terminating → removed from Service endpoints → preStop hook → SIGTERM sent → app shuts down gracefully → after terminationGracePeriodSeconds (default 30 s) → SIGKILL.
Deployment rollout lifecycle: new ReplicaSet created → pods scaled up/old down according to maxSurge/maxUnavailable → readiness gates progress → rollout complete (or stuck → kubectl rollout undo). Revision history kept (revisionHistoryLimit, default 10).
Cluster lifecycle (AKS): create cluster/node pools → deploy workloads → monitor → upgrade control plane then node pools (node image and Kubernetes version) → scale → eventually decommission.
Tools used to develop
| Tool | Use |
|---|---|
kubectl | CLI for everything |
| Helm | Package manager (charts, releases, values) |
Kustomize (kubectl apply -k) | Template-free overlays per environment |
| k9s, Lens/Headlamp, Kubernetes Dashboard | Cluster UIs |
| kind, minikube, k3d, Docker Desktop | Local clusters |
Azure CLI (az aks), Azure portal | AKS management |
| Argo CD, Flux | GitOps continuous delivery |
| KEDA | Event-driven autoscaling (queues, Kafka, cron) |
| Prometheus + Grafana, Azure Monitor Container Insights | Metrics and dashboards |
| Istio, Linkerd | Service mesh |
| cert-manager, external-dns, ingress-nginx / Application Gateway for Containers | TLS, DNS, ingress |
| Trivy, Kubescape, kube-bench | Security scanning |