Foreword
Read little, type a lot. In “Docker Compose hands-on” you started the
notes application with a single file, tested it, hardened
it and moved it to a second Docker host. This book starts where the
other one ends: with the same three images, the same Postgres database
and the question of what changes when the containers are no longer
started by one host but by a cluster that decides on its own where they
run.
On Day 1 you start a single Pod and see that it is simply gone once
you delete it. From Day 2 on, Kubernetes takes over: Deployments heal
themselves and roll out new versions without downtime, Services give the
Pods stable names, ConfigMaps and Secrets separate configuration from
the image, probes tell the cluster when a Pod is ready. After that it
gets close to production: resources and quotas, Postgres as a
StatefulSet with its own volume, Pods under the restricted
profile, Helm with third-party charts and a chart of your own, Gateway
API and NetworkPolicies. In Part 2 you move to a real three-node cluster
and practice what really happens in operations: draining nodes,
surviving failures, upgrading Kubernetes, backing up etcd.
Everything runs on your laptop, without a cloud account and without a
public domain. Part 1 uses kind (“Kubernetes in Docker”) under Colima:
three nodes as containers, rebuilt in a few minutes. Part 2 uses three
VMs with RKE2, a Kubernetes distribution of the kind that also runs in
data centers. You already know the demo application notes:
a Go API, a Python worker, a Node frontend and Postgres.
This book is for platform engineers, developers, and DevOps and ops people who know Dockerfiles and Compose well but have so far only used Kubernetes or seen it from a distance – and who now want to understand it, verify it and run it themselves.
The Training Rules
- Type, don’t copy. Every command once yourself.
- Compare with Expected. After every drill you see what you should get. If it differs, that is where the real lesson is.
- Pass the checkpoint. Only when every check command shows what is expected do you move on.
- Solve the challenge on your own. First the hint, then the solution.
- Lab values stay in the lab.
lab-api-key-123,lab-db-pw-123and all otherlab-…values are practice data. A real password never belongs in a manifest, a script or a chart that you create in this book.
Warning: All output in this book comes from real test runs. Pod names, IP addresses, times and patch versions will differ on your machine. What matters is what happens: which Pod starts, waits, is restarted or is replaced.
Structure of Each Training Day
| Section | Purpose |
|---|---|
| Briefing | The essentials in a few bullet points |
| Drills | Commands with expected output |
| Checkpoint | Check script: did everything work? |
| Challenge | A task without instructions |
| Enterprise Note | What is different in production |
The Training Plan
| Part | Day | Unit |
|---|---|---|
| Ground | 0 | The training ground |
| 1 – kind | 1 | The first Pod |
| 2 | Deployments | |
| 3 | Services and DNS | |
| 4 | Configuration – ConfigMaps and Secrets | |
| 5 | Probes and lifecycle | |
| 6 | Resources and namespaces | |
| 7 | Postgres as a StatefulSet | |
| 8 | Security in the Pod | |
| 9 | Helm – using charts | |
| 10 | Helm – your own chart | |
| 11 | Reachable from outside, sealed off inside | |
| 2 – RKE2 | 12 | A three-node cluster with RKE2 |
| 13 | Moving with values-rke2.yaml |
|
| 14 | Operations: drain, failure, upgrade, etcd snapshot | |
| Competition | 15 | Disaster drills |
| Appendix | A | Cheat sheet |
| B | Final exam |
Part 1 builds the application layer by layer in the kind cluster until it runs as a hardened Helm chart behind a Gateway. Part 2 takes this chart and uses it to move to three VMs that you start with Multipass on your Mac; any other Ubuntu VM with SSH and sudo works too. There you learn what a kind cluster keeps from you: real nodes that fail, and an upgrade that you run yourself. Day 15 trains for the emergency.
Tip: The tested versions of kind, Kubernetes, kubectl and Helm are listed on Day 0. If a field differs on your machine:
kubectl explaindescribes every field directly from your cluster, and the reference is atkubernetes.io/docs/reference/.
Where this book only touches on an area, the sister books go into depth: “Gateway API hands-on” for routing and TLS at the edge of the cluster, “Kyverno & NetworkPolicies hands-on” for policies, “OpenBao secrets hands-on” for secrets outside the cluster, “Secure supply chains hands-on” for signed images and “Kubernetes operators hands-on” for your own controllers.
The Companion Code
All files from this book are publicly available on GitHub: https://github.com/thomaszachmann/kubernetes-zum-anfassen. Day 0 shows how to get them.
Let’s go.
Thomas Zachmann, 2026