Kubernetes Tutorial: Pods to Operators, Interactive & Visual

Learn Kubernetes from zero in 46 interactive chapters: Pods, Deployments, Services, config, networking, storage, scheduling, autoscaling, security and operators.

What you will learn

  • Why Kubernetes, and Docker vs Kubernetes
  • Pods in depth, and writing your first Pod
  • ReplicaSets, Deployments and Services
  • Health probes and graceful shutdown
  • Blue-green and canary deployments
  • Env vars, ConfigMaps, Secrets and the Downward API
  • Requests, limits, QoS, quotas and LimitRanges
  • Networking basics, Ingress, Gateway API and Network Policies
  • Packet Run: a networking puzzle game
  • Volumes, PersistentVolumes and StorageClasses
  • Init containers, sidecars, adapters and ambassadors
  • Jobs, CronJobs, DaemonSets and StatefulSets
  • Scheduling, affinity, taints and autoscaling
  • securityContext, Pod Security and RBAC
  • Cluster architecture, controllers and operators

How it works

Forty-seven interactive chapters: crash Pods and watch them come back, route requests, drain nodes, scale with the HPA, and click through the cluster.

Lessons

  1. Why Kubernetes? — Why Docker alone gets painful with hundreds of containers, what container orchestration means, and how Kubernetes keeps the copies you asked for running.
  2. Docker vs Kubernetes — Docker builds images and runs containers; Kubernetes manages containers at scale across many machines. See how code becomes an image, a container, then a Pod.
  3. Pods: the most important word — A Pod is the smallest unit Kubernetes runs: a wrapper that gives your container an IP, storage and a lifecycle. Why bare Pods are not recreated when they die.
  4. Deployments, Services and desired state — How a Deployment keeps the desired number of Pods running, how a Service gives them a stable address, and imperative vs declarative configuration.
  5. What a Pod really is — Why Kubernetes uses Pods instead of bare containers, when a Pod holds a sidecar, why unrelated apps get separate Pods, and Pod vs container.
  6. Pod networking: IPs, localhost and ports — Every Pod gets its own temporary IP. Containers in a Pod share it and talk on localhost, so their ports must not clash. Try it in an interactive lab.
  7. Pod storage, lifecycle, and why Pods are disposable — Pod phases from Pending to Succeeded or Failed, ImagePullBackOff, container restarts vs deleted Pods, shared volumes, and Pod vs Node.
  8. Writing your first Pod — pod.yaml explained line by line: apiVersion, kind, metadata, spec and containers. Then kubectl apply, get, describe, logs and exec, and READY 1/1.
  9. ReplicaSet: keep N Pods alive — How a ReplicaSet keeps N Pods alive using labels and selectors, its YAML, kubectl scale, and why it cannot roll out a new image.
  10. Deployment: updates and rollbacks — How a Deployment manages ReplicaSets to roll out new versions with no downtime, maxSurge and maxUnavailable, and kubectl rollout undo. Interactive.
  11. Service: one stable address for many Pods — How a Service finds Pods by label, port vs targetPort, DNS names, the four Service types, and debugging a Service with no endpoints.
  12. Pod vs ReplicaSet vs Deployment vs Service — The differences between Pod, ReplicaSet, Deployment and Service side by side, how labels connect them, and one complete Deployment + Service example.
  13. Health probes: liveness, readiness and startup — What liveness, readiness and startup probes do, httpGet vs tcpSocket vs exec, timing settings, and the mistakes that cause restart loops.
  14. Managed lifecycle: starting and stopping politely — How Kubernetes stops containers: SIGTERM, SIGKILL and terminationGracePeriodSeconds, preStop and postStart hooks, init containers, and Node.js shutdown.
  15. Deployment strategies: rolling, recreate, blue-green, canary — Rolling update, Recreate, blue-green and canary releases in Kubernetes: how each works, the trade-offs, and tools like Argo Rollouts and Flagger.
  16. Environment variables — Set environment variables in a Kubernetes Deployment with env, read them in Node with process.env, check them with kubectl, and avoid the quoting mistakes.
  17. A whole app in one file — Six microservices in one all.yaml: Deployments and Services separated by ---, env vars with Service names, LoadBalancer vs ClusterIP, imagePullPolicy.
  18. ConfigMaps: configuration outside the image — Keep configuration out of your image with ConfigMaps: single keys, envFrom, config files as volumes, kubectl create configmap, and what happens on updates.
  19. Secrets: handling sensitive data — Why base64 is not encryption, data vs stringData, Secret types, mounting Secrets as env vars or files, and what protects them: RBAC, encryption, no Git.
  20. Self awareness: the Downward API — Give a container its own Pod name, namespace, IP, node, labels and resource limits with fieldRef and resourceFieldRef, as env vars or files.
  21. Immutable configuration and config templates — Lock ConfigMaps with immutable: true, release config as versioned names or Kustomize hashes for real rollbacks, and fill config templates at startup.
  22. CPU and memory: requests, limits and QoS — CPU and memory requests vs limits: how requests drive scheduling, why CPU is throttled but memory is OOMKilled, units, and the three QoS classes.
  23. Namespaces, ResourceQuotas and LimitRanges — Namespaces, ResourceQuota budgets for CPU, memory and object counts, LimitRange defaults and min/max per container, and debugging exceeded quota errors.
  24. Networking basics you need first — The networking ideas you need before Kubernetes, made easy: IPs, ports, localhost vs 0.0.0.0, CIDR ranges, DNS, routing, NAT and load balancers.
  25. Kubernetes networking — How Pods talk to Pods, how kube-proxy turns a ClusterIP into a Pod IP, cluster DNS search domains, Ingress, NetworkPolicy, and a debugging checklist.
  26. Headless Services: talking to one specific Pod — What a headless Service is, why DNS returns every Pod IP, and how StatefulSets get stable per-Pod names like db-0.db-headless for databases.
  27. Ingress and Gateway API: one front door — Ingress controllers, path-based and host-based routing, TLS termination with cert-manager, annotations, and how the Gateway API improves on Ingress.
  28. Network Policies: a firewall for Pods — Firewall rules for Pods: default deny, allowing traffic by label, namespace or IP range, egress rules, the AND/OR trap, and why DNS breaks.
  29. 🎮 Packet Run 📦 → 🎯 — Learn networking by playing: 35 puzzle levels from cables, IPs and DNS to Pod networking, Kubernetes Services, Ingress, NetworkPolicies and DNS debugging.
  30. Volumes: emptyDir and hostPath — How Kubernetes volumes work, what survives a container crash, Pod delete or node move, emptyDir for scratch and sharing, and why hostPath is risky.
  31. PersistentVolumes and PersistentVolumeClaims — PersistentVolume vs PersistentVolumeClaim, how binding works, access modes RWO, RWX, ROX and RWOP, and running replicas with ReadWriteOnce disks.
  32. StorageClasses and dynamic provisioning — How StorageClasses create disks on demand, the default class, WaitForFirstConsumer, reclaim policies Delete, Retain and Recycle, and volume expansion.
  33. Ephemeral volumes — Generic ephemeral volumes that create a PVC per Pod, CSI inline volumes such as the Secrets Store CSI Driver, and how to choose between storage types.
  34. Init containers and sidecars — Run setup steps before your app with init containers, add helpers beside it with sidecars, and use native sidecars that start first and let Jobs finish.
  35. Adapter and ambassador containers — Two sidecar patterns: adapters translate app metrics and logs into a standard format, ambassadors proxy outgoing calls to databases and APIs.
  36. Jobs and CronJobs: work that finishes — Run tasks that finish with Jobs: retries, deadlines, parallelism and indexed work. Schedule them with CronJobs, time zones and concurrency policies.
  37. DaemonSets: one Pod on every node — How a DaemonSet runs one Pod on every node for logs, metrics and networking, tolerations, nodeSelector, update strategies and static Pods.
  38. StatefulSets: apps with identity and data — Why databases need StatefulSets: stable Pod names, ordered start and stop, a PVC per replica with volumeClaimTemplates, and partitioned rolling updates.
  39. Singletons and disruptions — Run exactly one active copy with replicas 1, Recreate or leader election on a Lease, and keep enough Pods running during drains with a PodDisruptionBudget.
  40. Scheduling: where Pods run — How the scheduler places Pods: filtering and scoring, nodeSelector, node and pod affinity, topology spread, taints and tolerations, and priority.
  41. Autoscaling: HPA, VPA and cluster autoscaling — Scale Pods with the HPA, right-size them with the VPA, scale workers to zero with KEDA, and add nodes with the cluster autoscaler. Includes the HPA maths.
  42. Process containment: securityContext and Pod Security — Run containers as non-root, drop capabilities, use a read-only filesystem and seccomp, and enforce the baseline and restricted Pod Security Standards.
  43. Access control: RBAC — Who may do what in Kubernetes: users, groups and ServiceAccounts, Role vs ClusterRole, RoleBindings, kubectl auth can-i, and risky permissions.
  44. Kubernetes cluster architecture — Click through the control plane (API server, scheduler, etcd), worker nodes (kubelet, kube-proxy) and API objects, then trace one kubectl apply.
  45. Controllers: the reconcile loop — How Kubernetes controllers observe, compare and act, why they watch the API and look at state not events, owner references, and a tiny controller.
  46. Operators: controllers with expert knowledge — What an Operator is: a CustomResourceDefinition plus a controller with expert knowledge. Examples, capability levels, and when not to write one.
  47. Building images inside the cluster — Build images in the cluster without a Docker daemon: why to avoid Docker-in-Docker, daemonless builders, Buildpacks, and Shipwright builds.

More courses

  • Jobs, linked to lessons — Browse jobs where every requirement links to the chapter that teaches it. See how ready you are, how long the gap takes to close, and which listings look stale.
  • Match a job post to courses — Paste a job post. Each skill is matched to a track here and put in learning order, foundations first.
  • React from open source with patterns — Patterns extracted from Material UI, Radix, React Aria, React Hook Form, Redux Toolkit, TanStack, and Next.js — not slides about hooks.
  • Database in depth — How a query becomes work. Indexes, isolation, locks, and the plans that explain why a page is slow — not an ORM tour.
  • System Design — Core concepts first (SQL vs NoSQL, CAP, indexing, replication, sharding), then designs grouped by what carries them: the database, Redis, Kafka, or many services.
  • Build a real API with NestJS — One ticket-booking API, built in order: a plain Node server first, then NestJS modules, validation, a real database, and the features real clients lean on.
  • Microservices — Microservice patterns one diagram at a time: how to split a monolith, how services talk, and how data stays consistent without distributed transactions.
  • Kafka — A beginner-to-senior path through event logs, reliable delivery, production operations, and disaster recovery.
  • AI engineering for software engineers — Eight free reads, in order, for software engineers moving into AI: when to build an agent, how to build one, how to test it, and how the model works underneath.
  • Frontend system design — How a UI is sliced when it is a product, not a page: ownership of state, cache, routes, and what happens when the network lies.
  • TypeScript in depth — The type system as a design tool. Inference, narrowing, generics, and the errors that mean the model is wrong — not a catalog of utility types.
  • CSS in depth — See the box, then the page. Visual chapters from the box model through Flexbox surprises, Grid, selectors, and units, then backgrounds, shapes, and visual effects, each with a playground.
  • Accessibility — Foundations first (WCAG in plain words, semantic HTML, lists, alt text), then hands-on HTML labs, a full pass of WAI-ARIA 1.3, and a final fix-the-page challenge.
  • Docker — What an image is, why layers cache, and how containers find each other on a network.
  • Redis — Fifteen Redis patterns, one picture each: cache, session, lock, counter, rate limiter, queue, and when Redis is the wrong tool.