The Application Is More Than Its Source Code
Runtimes, dependencies, configuration, and external services; why manually prepared machines drift; VM and container boundaries.

From Docker to Kubernetes: A Hands-On Guide to Containers with kind β 2026 Edition
Overview
A hands-on introduction for developers meeting containers for the first time. One small Web Β· API Β· Redis application is packaged as an image, connected to its dependencies, hardened for delivery, orchestrated with a three-node Swarm, and finally rebuilt on Kubernetes with Deployments, Services, ConfigMaps, persistent volumes, and Ingress. Each chapter asks you to observe a concrete boundary and explain what the evidence proves β and the book shows the real output of every lab.
Docker 29 Β· kind 0.33 Β· Kubernetes v1.37 β every lab executed
26,034 words (21 chapters + 5 appendices)
Complete β preparing Kindle (KDP) publication
A deliberately small application: an Nginx web page calls an Express API, which increments a counter in Redis. The same three parts run as single containers, as a Compose project, as a Swarm stack, and finally as a Kubernetes application, so the platformβs responsibilities stay visible.
An enterprise cloud architect with more than 20 years of experience in software development, application architecture, and technical architecture. He has designed, built, and operated Kubernetes-based platforms and has taught developers and engineers through Inflearn. He is the founder and operator of AIDevOps.kr.
Lab Environment
All the code in this book runs on one computer with Docker installed, with no cloud account or separate server. The Kubernetes labs use a local cluster created with kind (Kubernetes in Docker), so every manifest in Chapters 15β21 and Appendix E can be applied exactly as it is in the free companion files to get the same results as the book. kind uses Docker containers as Kubernetes nodes, so there is no infrastructure to prepare beyond Docker.
Run with Docker Engine and Compose alone. Image builds, networks, volumes, Compose, and a local registry all happen on the same computer.
Three Docker engines run inside Docker to form a three-node Swarm. You do not need three servers.
One kind cluster (named intro) runs Pods, Deployments, Services, ConfigMaps and Secrets, PersistentVolumeClaims, Ingress, and the full Mini CloudShop deployment.
Four deliberately broken manifests are applied to the same kind cluster so you reproduce and recover from Pending, ImagePullBackOff, OOMKilled, and a configuration conflict yourself.
With Docker running, create the learning cluster. Confirm that the current context is kind-intro.
kind create cluster --name intro --wait 2m
kubectl config current-contextA kind node is a Docker container, so it cannot see the images on the host. Build the images from the companion/ folder and hand them to the node with kind load. The manifests set imagePullPolicy: IfNotPresent.
docker build -t intro-api:1.0 ./api
docker build -t intro-web:1.0 ./web
kind load docker-image intro-api:1.0 intro-web:1.0 --name introApply them in chapter order from the companion/k8s/ folder. Chapter 20 deploys the whole app/ folder at once.
kubectl apply -f pod.yaml
kubectl apply -f deployment.yaml -f service.yaml
kubectl apply -f app/Install Traefik with Helm. A local kind cluster has no external load balancer, so the Traefik Service stays ClusterIP and you reach the entry point with port-forward.
helm repo add traefik https://traefik.github.io/charts
helm repo update
helm upgrade --install traefik traefik/traefik --version 41.6.0 \
--namespace traefik --create-namespace \
--set providers.kubernetesIngress.enabled=true \
--set providers.kubernetesGateway.enabled=false \
--set service.spec.type=ClusterIP
kubectl port-forward -n traefik svc/traefik 8080:80Deleting the cluster removes every Kubernetes resource the labs created. You can start again from step 1 whenever you need to.
kind delete cluster --name introThe labs were run and checked on Docker 29, kind v0.33, Kubernetes v1.37.0, and Traefik Helm chart 41.6.0, and the book prints that real output. Pod names, timestamps, and counter values differ per environment. kind is a local learning cluster, so production conditions such as an external load balancer or failures across several servers are not covered.
Table of Contents
Chapters 1-9 cover Docker fundamentals with one small application. Chapters 10-12 strengthen image and operational reasoning, Chapters 13-14 introduce orchestration with Docker Swarm, and Chapters 15-21 rebuild the same application on Kubernetes. Five appendices add a command reference, worked cases, and a troubleshooting lab.
Runtimes, dependencies, configuration, and external services; why manually prepared machines drift; VM and container boundaries.
Follow a command from the CLI to the engine, separate the image template from the container instance, and read the lifecycle.
Start a named web server, read both sides of a port mapping, and work through a failed request with evidence.
Layers, image references, the local image store, and why pulling, tagging, and pushing are separate operations.
The build context as an input boundary, cache-friendly ordering, CMD versus ENTRYPOINT, and what a successful build does not prove.
Read the application by its boundaries, build and start the API, and see why localhost inside a container is not your laptop.
A user-defined network and service names, one request traced end to end, and name resolution separated from connectivity.
The writable layer, named volumes, replacement versus restart, bind mounts, and cleanup commands that delete data.
One file for Web, API, and Redis; startup order versus readiness; and stopping an application without losing its data.
Multi-stage builds, a non-root user, health checks, BuildKit, buildx, and SBOMs β with the baseline recorded first.
A local registry, push and pull, digests that keep naming the tested image after a tag moves, and a release record.
Five tools for five questions, a bounded restart policy, a reproduced memory-limit kill, and a timeline before any fix.
Desired state and reconciliation, what automatic recovery does not recover, and control traffic versus request traffic.
A three-node nested Swarm: services and tasks, worker loss and replacement, and a failed update that rolls back.
API server, scheduler, kubelet, and controllers; installing kind and kubectl; following a declaration through the control loop.
A standalone Pod versus a Deployment, intentional scaling, and a failed rollout recovered with rollout undo.
Services select workloads, not instances; a deliberately broken selector; ClusterIP versus external exposure.
ConfigMaps and Secrets without rebuilding, a PersistentVolumeClaim for Redis, and emptyDir compared with persistent storage.
An Ingress rule is not a router: install Traefik deliberately and locate which component produced an error.
Map Compose responsibilities to Kubernetes objects, deploy into its own namespace, and prove replacement and persistence.
Explain one request end to end, keep a compact evidence record, and know the limits of an introductory system.
Docker and kubectl commands grouped by the question they answer.
What each file promises, and the indentation and quoting mistakes that change it.
A broken button, a release that never arrives, and a replacement Pod with an empty directory.
Where to read the authoritative documentation for each tool.
Pending, ImagePullBackOff, OOMKilled, and a configuration collision β diagnosed and recovered.
Companion Materials
Every companion/... path referenced throughout the book maps to the same path inside the zip downloadable from this page. The zip holds 32 files: the Mini CloudShop API and Web source, Dockerfiles, the Compose file, the Swarm lab, and every Kubernetes manifest β including four deliberately broken ones for the troubleshooting lab. This page is the official distribution point for the companion materials.
The same files are also on GitHub, where the README covers the folder layout and a chapter-by-chapter lab guide: github.com/aidevops-books/docker-kubernetes-intro-en
api/
The Express API (server.js, package.json) and its Dockerfile.
compose.yaml
Web, API, and Redis with a named volume for Redis data.
web/
The Nginx web page and the template that proxies /api to the API.
api/Dockerfile.secure
A multi-stage, non-root image with a HEALTHCHECK.
swarm/
Three nested Docker engines, a registry, and the stack file for the Swarm lab.
k8s/pod.yaml, deployment.yaml, service.yaml
A standalone Pod, a Deployment, and a ClusterIP Service.
k8s/config.yaml, deployment-config.yaml, redis.yaml, emptydir-pod.yaml
ConfigMap and Secret, Redis with a PersistentVolumeClaim, and an emptyDir comparison.
k8s/ingress.yaml
The first Ingress rule, served by Traefik.
k8s/app/
The full application in namespace cloudshop: configuration, Redis with a PVC, API, Web, and Ingress.
k8s/broken/
Four deliberately broken manifests: Pending, ImagePullBackOff, OOMKilled, and a missing REDIS_PORT.
README.md, LEARNING_RECORD.md
How to use the files, and a template for your learning record.
Publication Status
All chapters are complete and every lab has been run on Docker 29, kind 0.33, and Kubernetes v1.37; the book shows the real output. It is being prepared for Kindle (KDP) publication. The companion files below are free and final.
AIDevOps Cloud Native Series
This book is the entry point of the series: it takes a developer from a first container to a first Kubernetes application. The books below continue from there.
AIDevOps Books Β· Learn. Build. Operate. Evolve.
β Back to all books