Learn Labs
Capstone

Capstone Project

Deploy, harden, scale, and drill an application across zones

Take an application from an earlier module (the Nginx module's backend, or something of your own with a database) to a production-ready Kubernetes deployment on the lab cluster. Put everything in kubernetes/capstone/ and commit as you go.

Milestone 1: from nothing, with one command

  • Manifests (kustomize, or a Helm chart) for the app, its database or cache, Services, a Gateway and HTTPRoute, in their own namespace with Pod Security restricted enforced.
  • make up (or a script) creates the cluster, installs the platform, and deploys the app. make down deletes everything.

Done when: a fresh clone reaches a working app with one command, and kubectl apply --dry-run=server passes in CI.

Milestone 2: zero-downtime changes

  • Startup, readiness and liveness probes designed per the Probes lesson (no dependencies in liveness).
  • Graceful shutdown: preStop sleep, SIGTERM handling, a grace period that fits.
  • Configuration through a hashed ConfigMap, so config changes roll out.

Done when: ten rollouts under 50 requests per second produce zero hangs, and fewer errors than one per thousand requests.

Milestone 3: resources and scaling

  • Requests from measured usage, memory limits above peak, a decision on CPU limits written down with the measurement behind it.
  • An HPA (CPU, or a request-rate metric through KEDA or the Prometheus Adapter), with replicas removed from the Deployment.

Done when: a load test scales the app up within a minute and back down, without errors, and no container is OOMKilled.

Milestone 4: availability

  • Hard zone spread, a PDB that allows one disruption, and a decision on node-failure tolerations.
  • The stateful component either replicated across zones (an operator) or explicitly accepted as a single point of failure, with its recovery procedure written down.

Done when: a drill of a rollout, a node drain, a node failure and the loss of a whole zone (stop every node in it) shows, for each, client errors, the time to recover, and which alert fired.

Milestone 5: security and observability

  • NetworkPolicies: default deny for ingress and egress, with explicit allows including DNS.
  • No service account token in pods that don't need it; RBAC for any that do; no Secrets in git.
  • Alerts and a dashboard for the app and the platform it depends on.

On this page