Kubernetes Tutorial with Examples.
Kubernetes tutorial with examples: container orchestration with pods, deployments, services, ConfigMaps, Secrets, autoscaling and Helm charts.
Architecture at a glance
Click any box to open the lesson that teaches it
Kubernetes architecture at a glance
kubectl apply → control plane → nodes → Pods, and how traffic finds them
How it fits together (6 steps)
- You declare the desired state in YAML and send it with kubectl;
applyreturns once the API server has stored it. - The API server is the only door to etcd. Every request passes authentication, RBAC and admission first.
- The scheduler picks a node for each Pod, using its resource requests. Controllers run reconcile loops: a Deployment owns a ReplicaSet, which keeps N Pods alive, and the HPA changes N from real CPU numbers.
- On each node, the kubelet asks the container runtime to start the Pod's containers and runs its probes. Config and storage come from ConfigMaps, Secrets and volumes.
- Traffic: Ingress routes HTTP to a Service, a stable name and IP that kube-proxy load-balances across the matching Pods.
- Around the cluster: Helm packages and rolls back releases. Lessons from other topics add Pod Security admission, a CIS benchmark, GitOps and deployment strategies.
Beginner
Start here — no prior experience needed
Kubernetes Fundamentals
Learn the core concepts of Kubernetes—clusters, pods, deployments, services, namespaces, and how to reason about orchestration.
Pods and Workloads
Understand pods, containers, labels, selectors, and how Kubernetes schedules and manages workload lifecycles.
Kubernetes Services — Hands-On
Run a Service on a real cluster: ClusterIP, DNS names across namespaces, NodePort, Ingress routing, port-forwarding, and debugging empty endpoints.
Intermediate
For developers with core concepts down
Deployments and Rollouts
Learn how Deployments manage replica sets, rolling updates, rollbacks, and rollout strategies in Kubernetes.
Services and Networking
Put a real backend behind ClusterIP, NodePort and LoadBalancer Services, then trace DNS across namespaces, EndpointSlices and headless Services.
ConfigMaps, Secrets, and Storage
Keep config out of images with ConfigMaps and Secrets, share files via emptyDir, and keep data through Pod deletion with a PVC, all run on minikube.
Workload Controllers
Run Deployments, StatefulSets, DaemonSets, Jobs and CronJobs on a real cluster and watch each controller reconcile Pods toward the desired state.
Horizontal Pod Autoscaling: Real Replicas, Real CPU Numbers
Deploy a CPU-hungry container behind an HPA and watch replica count climb in real time as metrics-server reports real utilization — no simulated numbers, just kubectl get hpa polled while it happens.
Helm: Packaging Manifests, and a Real Rollback
Every earlier lesson hand-applies individual YAML files. Package the same Deployment and Service as a Helm chart, upgrade it with a real broken image tag, and roll it back with helm rollback.
Advanced
Production-grade patterns for experienced engineers
Also part of Kubernetes
Taught in other topics. Each link opens the lesson in its home topic.
Deploying FastAPI with Docker and Kubernetes: Images, Signals, and Probes
Ship FastAPI on Docker and Kubernetes: a 171 MB multi-stage image, clean SIGTERM shutdown, and liveness, readiness and startup probes on a live minikube.
Deployment Strategies Compared: Rolling, Blue-Green, and Canary
Measure the real request failure rate of a rolling deployment, prove blue-green's zero-downtime claim, and show canary's blast-radius containment against a real bug.
GitOps in Practice: Git as the Source of Truth
Build a real sync loop that reads desired state from a git repo, applies it to a separate cluster-state file, and self-heals manual drift back to what git says.
Kubernetes Pod Security Admission: Enforcing the Restricted Profile
Label a namespace restricted and watch Kubernetes reject a privileged pod with the real violates PodSecurity message, then admit the compliant spec.
CIS Kubernetes Benchmark Checks with kube-bench in kind
Run kube-bench against a local kind cluster, read a real FAIL from the CIS Kubernetes Benchmark, fix it in the cluster config and re-run it to PASS.