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. 1. Docker & Kubernetes · 12 min
    Why 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. 2. Docker & Kubernetes · 15 min
    Writing 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

  1. 3. Docker & Kubernetes · 14 min
    Volumes, Networks and Running Containers Safely

    Persisting data, bind mounts, networks and ports, environment variables and secrets, non-root users and other safety habits.

  2. 4. Docker & Kubernetes · 13 min
    Docker Compose: Running a Whole App Locally

    Services, networks, volumes, health checks and depends_on, a Node app with Postgres and Redis, and development habits.

  3. 5. DevOps · 20 min
    Docker: 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

  1. 6. Docker & Kubernetes · 15 min
    Kubernetes Core Ideas: Cluster, Pods and Deployments

    Why orchestration, control plane and nodes, pods, ReplicaSets and Deployments, declarative YAML and the reconcile loop.

  2. 7. Docker & Kubernetes · 14 min
    Services, Ingress and Networking in Kubernetes

    How pods find each other, ClusterIP, NodePort and LoadBalancer, DNS names, Ingress, and what a service mesh is for.

  3. 8. Docker & Kubernetes · 14 min
    Configuration, Secrets and Storage in Kubernetes

    ConfigMaps, Secrets and their limits, persistent volumes and claims, StatefulSets at a glance.

4. Scaling and debugging

  1. 9. Docker & Kubernetes · 15 min
    Scaling, Rollouts and Reliability: Probes, Resources and Autoscaling

    Readiness and liveness probes, requests and limits, rolling updates and rollbacks, HPA, PodDisruptionBudgets.

  2. 10. Docker & Kubernetes · 14 min
    Debugging Containers and Clusters

    The commands to read logs, exec in, describe events, and fix the classic failures: CrashLoopBackOff, ImagePullBackOff, Pending, OOMKilled.

5. Interview practice

  1. 11. Docker & Kubernetes · 16 min
    Docker 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.