zkt25/z2
2025-04-16 09:30:39 +00:00
..
app Initial commit - Flask + PostgreSQL Kubernetes app 2025-04-16 09:54:14 +02:00
k8s Initial commit - Flask + PostgreSQL Kubernetes app 2025-04-16 09:54:14 +02:00
Dockerfile Initial commit - Flask + PostgreSQL Kubernetes app 2025-04-16 09:54:14 +02:00
prepare-app.sh Initial commit - Flask + PostgreSQL Kubernetes app 2025-04-16 09:54:14 +02:00
README.md Update z2/README.md 2025-04-16 09:30:39 +00:00
start-app.sh Initial commit - Flask + PostgreSQL Kubernetes app 2025-04-16 09:54:14 +02:00
stop-app.sh Initial commit - Flask + PostgreSQL Kubernetes app 2025-04-16 09:54:14 +02:00

Flask + PostgreSQL Kubernetes WebApp

📁 Project Structure

  • app/: Flask source code (main.py, requirements.txt)
  • k8s/: All Kubernetes manifests
  • Dockerfile: For building the Flask app image

🛠️ Setup

Build the Flask Image

./prepare-app.sh

hafzal03@LAPTOP-ELUS3HGM:~/mypro/z2$ kubectl get pods -n webapp-namespace
NAME                        READY   STATUS    RESTARTS   AGE
flask-app-6b844bf6-cq9t6    1/1     Running   0          8m37s
postgres-644fc4c86d-l9h4f   1/1     Running   0          14m
hafzal03@LAPTOP-ELUS3HGM:~/mypro/z2$ minikube service flask-service -n webapp-namespace

minikube service flask-service -n webapp-namespace

kubectl get pods -n webapp-namespace

kubectl rollout restart deployment flask-app -n webapp-namespace