zkt25/z2/README.md

858 B

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 namespace
  • persistent-storage.yaml: PVC for Postgres data
  • postgres-deployment.yaml / postgres-service.yaml: Postgres setup
  • deployment.yaml / service.yaml: Web app setup
  • prepare-app.sh: build Docker image
  • start-app.sh: apply Kubernetes resources
  • stop-app.sh: delete all resources

Usage

  1. Build the image:

    ./prepare-app.sh
    
    
  2. Deploy to Kubernetes:

    ./start-app.sh
    
    
  3. Access the app: Open http://localhost:80 in your browser

  4. Clean up : ./stop-app.sh