.. | ||
app.py | ||
deployment.yaml | ||
Dockerfile | ||
namespace.yaml | ||
persistent-storage.yaml | ||
postgres-deployment.yaml | ||
postgres-service.yaml | ||
prepare-app.sh | ||
README.md | ||
requirements.txt | ||
service.yaml | ||
start-app.sh | ||
stop-app.sh |
Shopping List Web App on Kubernetes (Local)
This project deploys a Flask-based shopping list app with PostgreSQL on a local Kubernetes cluster (Docker Desktop).
Prerequisites
- Docker Desktop with Kubernetes enabled
- kubectl configured for
docker-desktop
context
Files
namespace.yaml
: Kubernetes namespacepersistent-storage.yaml
: PVC for Postgres datapostgres-deployment.yaml
/postgres-service.yaml
: Postgres setupdeployment.yaml
/service.yaml
: Web app setupprepare-app.sh
: build Docker imagestart-app.sh
: apply Kubernetes resourcesstop-app.sh
: delete all resources
Usage
-
Build the image:
./prepare-app.sh
-
Deploy to Kubernetes:
./start-app.sh
-
Access the app: Open http://localhost:80 in your browser
-
Clean up : ./stop-app.sh