Docker and Kubernetes Guide: Containers to Clusters
Containers solve the 'works on my machine' problem, and Kubernetes runs many of them for you. This guide starts with what a container really is, then builds up to a small cluster and the debugging skills you need when things fail.
Docker examples were run for real. Where the sandbox could not run a full cluster, the lessons say exactly what was and was not run.
Who it is for: Developers who deploy their own apps, and candidates for DevOps, platform and back-end roles.
11 lessons · Published by Jainik · Last updated
1. Containers and images
- 1. Docker & Kubernetes · 12 minWhy Containers: Images, Containers and How They Differ From VMs
The problem containers solve, namespaces and cgroups in plain words, images versus containers, registries, and the first docker run.
- 2. Docker & Kubernetes · 15 minWriting a Dockerfile: Layers, Caching and Small Images
Instruction by instruction, layer caching, multi-stage builds, base image choice, .dockerignore, and a Node app image built the right way.
2. Data, networks and Compose
- 3. Docker & Kubernetes · 14 minVolumes, Networks and Running Containers Safely
Persisting data, bind mounts, networks and ports, environment variables and secrets, non-root users and other safety habits.
- 4. Docker & Kubernetes · 13 minDocker Compose: Running a Whole App Locally
Services, networks, volumes, health checks and depends_on, a Node app with Postgres and Redis, and development habits.
- 5. DevOps · 20 minDocker: Containerize Your Next.js and Node App
Images, layers, Dockerfiles and Compose — build once, run the same thing on your laptop and on EC2.
3. Kubernetes core
- 6. Docker & Kubernetes · 15 minKubernetes Core Ideas: Cluster, Pods and Deployments
Why orchestration, control plane and nodes, pods, ReplicaSets and Deployments, declarative YAML and the reconcile loop.
- 7. Docker & Kubernetes · 14 minServices, Ingress and Networking in Kubernetes
How pods find each other, ClusterIP, NodePort and LoadBalancer, DNS names, Ingress, and what a service mesh is for.
- 8. Docker & Kubernetes · 14 minConfiguration, Secrets and Storage in Kubernetes
ConfigMaps, Secrets and their limits, persistent volumes and claims, StatefulSets at a glance.
4. Scaling and debugging
- 9. Docker & Kubernetes · 15 minScaling, Rollouts and Reliability: Probes, Resources and Autoscaling
Readiness and liveness probes, requests and limits, rolling updates and rollbacks, HPA, PodDisruptionBudgets.
- 10. Docker & Kubernetes · 14 minDebugging Containers and Clusters
The commands to read logs, exec in, describe events, and fix the classic failures: CrashLoopBackOff, ImagePullBackOff, Pending, OOMKilled.
5. Interview practice
- 11. Docker & Kubernetes · 16 minDocker and Kubernetes Interview Questions With Model Answers
Containers, images, networking, orchestration and troubleshooting questions with model answers.
More reading orders are on the guides page, and every series is listed on the home page.