Week 4: Kubernetes locally
Week 4: Kubernetes locally
Now the app moves into Kubernetes, in a small cluster called minikube. You describe the databases and the app as manifests, give the app its settings through a ConfigMap and a Secret, and end by comparing Kubernetes with Compose from last week.
Login is broken until the Secret exists, and data is lost when a pod is deleted. Both are deliberate, and both are fixed later.
Issues
Work through the issues in order, in your own repository. Each one builds on the one before.
| Issue | What you do |
|---|---|
auth | A shared-password login, so that only you can post. |
minikube-setup | Install minikube and kubectl, and prove the cluster works. |
deploy-databases | MongoDB and Redis as Deployments and Services. |
deploy-app | Cloudbook with a ConfigMap, a NodePort Service and several replicas. |
secrets | The password and signing key in a Secret that never reaches Git. |
compose-or-kubernetes | Experiments that show where the two tools differ, and your own conclusion. |
Write the week report in report/week-4.md after the last issue.
Slide decks
Each deck is a self-study lecture of about 15–20 minutes, except the intro, which takes about five.
- Week 4 intro: what the week asks of you
- Why orchestration: what an orchestrator does and what it costs
- Kubernetes objects: pods, Deployments, Services, desired state and reconciliation
- Config and Secrets: ConfigMaps, Secrets and why base64 is not encryption
- kubectl and declarative config: reading a cluster and working from files
Reading material
docs/KUBERNETES.mdin your repo- Kubernetes documentation
- minikube
- kubectl quick reference