The patterns, worked with our own services.
A chapter per pattern across the six families of cloud-native Kubernetes design — foundational, structural, behavioral, configuration, advanced, and security — each one worked with the tutorial's shipping services instead of a textbook's toy app, and each cross-referenced to where it lands on the CKAD exam.
It's organized as its own set with its own reading order. Every
chapter carries a CKAD exam lens and an
Explore with your agent call-out, and a runnable
example under examples/appendix-patterns/.
The set
Read a family at a time. Each chapter is self-contained — the pattern, why it matters, the manifests worked against a shipping service, cleanup, and a pointer to the runnable example.
00 Kubernetes patterns & CKAD: start here
The map: the six pattern families, how each chapter is built, the two call-outs, and how the set reconciles against the CKAD exam.
01 Predictable Demands
Declare what a container needs to run: CPU and memory requests and limits, a PriorityClass, and the ConfigMaps and PersistentVolumeClaims it can't start without.
02 Declarative Deployment
Roll a new version out with a Deployment's RollingUpdate and Recreate strategies, then compare them against kubectl rollout status, history, and undo.
03 Health Probe
Separate liveness from readiness with startup, liveness, and readiness probes, then add a readiness gate that only an external signal can satisfy.
04 Managed Lifecycle
Hook into a container's startup and shutdown with postStart and preStop, and size terminationGracePeriodSeconds so SIGTERM never arrives before a container is ready to receive it.
05 Automated Placement
Steer the scheduler with nodeSelector, node and pod affinity, and taints and tolerations, and spread a service's replicas across nodes for availability.
06 Init Container
Run ordered pre-start setup in a container that must finish before the main container ever starts, worked against notification-service's real Alembic migration.
07 Sidecar
Run a helper container beside the app in the same Pod, sharing its network and a volume, using the native sidecar mechanism for a correct startup and shutdown order.
08 Adapter
Normalize an application's own output into a standard interface with a sidecar, worked by translating shipping-service's JSON health body into Prometheus exposition text.
09 Ambassador
Broker an application's outbound connection through a localhost proxy sidecar, worked by letting shipping-service reach Postgres without a single Postgres-aware environment variable.
10 Batch Job
Run work to completion instead of forever with a Job's completions and parallelism, then partition a shared dataset deterministically with an Indexed Job.
11 Periodic Job
Wrap a Job in a CronJob to run it on a schedule, and reason about concurrencyPolicy, startingDeadlineSeconds, and history limits instead of a crontab on a server somewhere.
12 Daemon Service
Run exactly one infrastructure Pod per node with a DaemonSet, and see how its update strategy and tolerations differ from a Deployment's.
13 Singleton Service
Protect a single-instance service from voluntary disruption with a PodDisruptionBudget, and learn exactly which operations it governs and which it doesn't.
14 Stateless Service
Name the default shape most services should take: interchangeable Pods with no stable identity and no per-Pod storage, scaled horizontally through an ordinary Deployment.
15 Stateful Service
Give a workload stable per-Pod identity and sticky storage with a StatefulSet and a headless Service, and see exactly what a stateless Deployment can't offer.
16 Service Discovery
Reach a workload by a name that outlives any specific Pod: ClusterIP, NodePort, and LoadBalancer Services, kube-dns, and path-based routing through an Ingress.
17 Self Awareness
Let a container read its own Pod's metadata, identity, and declared resources through the Downward API, as environment variables and as a volume that updates in place.
18 Env Var Configuration
Populate a container's environment from three sources at once: a literal value in the manifest, a ConfigMap key, and a Secret key, and understand why none of them update a running container.
19 Configuration Resource
Bulk-expose a ConfigMap or Secret as environment variables with envFrom, mount the same resource as files at the same time, and see why one half updates live and the other doesn't.
20 Configuration Template
Render a structured config file from a template and an environment overlay with an init container, for configuration shapes a flat environment variable can't express.
21 Immutable Configuration
Mark a ConfigMap immutable, watch the API server reject an in-place edit, and roll a config change the only way an immutable resource allows: a new name and a new rollout.
22 Controller
The reconcile loop every controller shares: watch an object, compute the difference between its current and desired state, and act on only that difference, whether the controller ships with Kubernetes or is code you wrote yourself.
23 Elastic Scale
Three ways to change a workload's replica count without a human running kubectl scale: HPA and VPA reading the Pods themselves, and KEDA reading an external signal instead, which is the only path to zero.
24 Image Builder
Build a container image without Docker Engine on the host: minikube image build runs the build on the node itself, and a Kaniko Job builds inside a Pod and pushes to an in-cluster registry, the way a real CI pipeline would.
25 Operator
A CRD and a controller together, packaging an application's own operational knowledge as a Kubernetes API: the ShippingPolicy operator, built from scratch in Go with controller-runtime.
26 Access Control
Give a workload its own ServiceAccount, grant it exactly the ConfigMap and Secret reads it needs with a Role and RoleBinding, and prove the boundary with kubectl auth can-i.
27 Network Segmentation
Deny all ingress to a service by default, allow only the one caller that legitimately needs it, and restrict egress to the destinations a workload talks to, with NetworkPolicy.
28 Process Containment
Pin a container to a non-root UID, drop every Linux capability it doesn't name, make its root filesystem read-only, and enforce the floor with a namespace's Pod Security Standard.
29 Secure Configuration
Treat a Secret as a credential, not a ConfigMap with a different name: know what base64 doesn't do, keep credentials out of images and logs, and survey where to go once a raw Secret isn't enough.
30 Observability and Debugging
kubectl's windows into a running pod: logs (including -p, -c, -f), exec, port-forward, describe, get events, and kubectl debug ephemeral containers.
31 Packaging: Helm and Kustomize
Deploy the same shipping-service two ways: a Helm chart with install/upgrade/rollback, and a Kustomize base with dev and prod overlays, with no templating, just patches.
32 Namespace Governance
The namespace-level complement to a pod's own resource declarations: ResourceQuota caps a namespace's total consumption, LimitRange defaults and bounds every container in it, and PriorityClass still decides who wins when both are tight.
33 CKAD Crosswalk
The closing reference: every chapter in this appendix mapped to its CKAD domain and competency, a per-domain coverage summary, and a timed self-test against the shipping services.
Where this fits in the tutorial
This appendix is reached from §18 of the main tutorial. The earlier sections stood up the cluster and its building blocks — kubectl, helm, Istio, KEDA — and the §17 capstone wired them into one running system. This appendix steps back and names the patterns behind those pieces, one at a time, with the CKAD exam as a second lens.
The examples run on a dedicated mof-patterns minikube
profile, separate from the capstone's mof-capstone; the
host prerequisites are the same as
§1.
This appendix stays on plain Kubernetes; the OpenShift Local (CRC)
path is a separate corollary.