Update z2/README.md

This commit is contained in:
Hafzal Ahamed Hasan Mohamed 2025-04-16 09:30:39 +00:00
parent 1a77e8d933
commit f0091a1282

View File

@ -1,24 +1,16 @@
# Flask + PostgreSQL Kubernetes Deployment # Flask + PostgreSQL Kubernetes WebApp
This project deploys a Flask web application with a PostgreSQL backend using Kubernetes.
## 🛠 Structure
## 📁 Project Structure
- `app/`: Flask source code (`main.py`, `requirements.txt`) - `app/`: Flask source code (`main.py`, `requirements.txt`)
- `k8s/`: Kubernetes manifests for deployments, services, namespace, etc. - `k8s/`: All Kubernetes manifests
- `Dockerfile`: Builds the Flask app image - `Dockerfile`: For building the Flask app image
- `prepare-app.sh`: Builds Docker image and prepares volumes
- `start-app.sh`: Applies all Kubernetes objects
- `stop-app.sh`: Deletes all Kubernetes resources
- `statefulset.yaml`: Defines StatefulSet, PV, and PVC
## 🚀 Steps to Deploy ## 🛠️ Setup
1. **Prepare the application:** ### Build the Flask Image
```bash ```bash
./prepare-app.sh ./prepare-app.sh
hafzal03@LAPTOP-ELUS3HGM:~/mypro/z2$ kubectl get pods -n webapp-namespace hafzal03@LAPTOP-ELUS3HGM:~/mypro/z2$ kubectl get pods -n webapp-namespace
NAME READY STATUS RESTARTS AGE NAME READY STATUS RESTARTS AGE
flask-app-6b844bf6-cq9t6 1/1 Running 0 8m37s flask-app-6b844bf6-cq9t6 1/1 Running 0 8m37s