Final Project: Deploy a Multi-Tier App to Kubernetes
Put every piece together: Deployments, Services, config, and real kubectl usage, applied to an actual multi-tier application.
Requirements
- Containerize a simple app with at least two tiers (e.g. a web/API service and a database, or a frontend and a backend), each with its own Dockerfile.
- Write a Deployment + Service for each tier, the backend/API's Service should be
ClusterIP(internal only), the frontend's should be exposed (NodePortorLoadBalancer, depending on your cluster). - Externalize at least one piece of configuration into a ConfigMap and one credential into a Secret, referenced by your Deployments rather than hardcoded.
- Deploy everything to a local cluster (minikube or kind) using
kubectl apply -f, and confirm the frontend can actually reach the backend through its Service DNS name. - Perform a rolling update, change something in your app, rebuild the image, bump the tag, and re-apply, then verify with
kubectl rollout statusthat it completed without downtime.
Stretch goals
- Add a liveness and readiness probe to at least one Deployment.
- Use a PersistentVolumeClaim for the database tier's data directory so data survives a Pod restart.
- Split your environment into two namespaces (e.g.
stagingandproduction) using the same YAML with different config.
Submit a link to your finished project (a repo with your YAML manifests, or a recording/write-up of it running) below, an instructor will review it before you can mark this lesson complete. Good luck! 🚀