Update z2/README.md

This commit is contained in:
Hafzal Ahamed Hasan Mohamed 2025-04-16 09:36:36 +00:00
parent e02bb750cd
commit 05b5d61a2b

View File

@ -1,10 +1,10 @@
# 📘 Flask + PostgreSQL Kubernetes WebApp # Flask + PostgreSQL Kubernetes WebApp
A lightweight full-stack web application powered by **Flask** and **PostgreSQL**, containerized with **Docker**, and deployed on **Kubernetes (Minikube)** using custom `Namespace`, `Deployment`, `StatefulSet`, and `Services`. Designed to demonstrate a production-like cloud-native architecture. A lightweight full-stack web application powered by **Flask** and **PostgreSQL**, containerized with **Docker**, and deployed on **Kubernetes (Minikube)** using custom `Namespace`, `Deployment`, `StatefulSet`, and `Services`. Designed to demonstrate a production-like cloud-native architecture.
--- ---
## 📁 Project Structure ## Project Structure
```bash ```bash
z2/ z2/
@ -26,7 +26,7 @@ z2/
--- ---
## 🚀 How It Works ## How It Works
1. **Prepare the Environment** 1. **Prepare the Environment**
```bash ```bash
@ -55,7 +55,7 @@ z2/
--- ---
## 🪰 Technologies Used ## Technologies Used
| Tool | Purpose | | Tool | Purpose |
|----------------|------------------------------| |----------------|------------------------------|
@ -67,7 +67,7 @@ z2/
--- ---
## <EFBFBD> Health Checks ## Health Checks
To ensure resilience and uptime, Kubernetes probes can be added: To ensure resilience and uptime, Kubernetes probes can be added:
@ -87,7 +87,7 @@ readinessProbe:
periodSeconds: 10 periodSeconds: 10
``` ```
👉 Add a `/health` route to your `main.py`: Add a `/health` route to your `main.py`:
```python ```python
@app.route('/health') @app.route('/health')
def health(): def health():
@ -96,7 +96,7 @@ def health():
--- ---
## 🔍 Troubleshooting ## Troubleshooting
| Problem | Solution | | Problem | Solution |
|-------------------------------------|--------------------------------------------------------------------------| |-------------------------------------|--------------------------------------------------------------------------|
@ -108,7 +108,7 @@ def health():
--- ---
## 🌱 Future Enhancements ## Future Enhancements
- Use Helm for templated deployments - Use Helm for templated deployments
- Add database migrations (Alembic / Flask-Migrate) - Add database migrations (Alembic / Flask-Migrate)
@ -118,7 +118,7 @@ def health():
## 👨‍💻 Author ## Author
**Hafzal Ahamed Hasan Mohamed** **Hafzal Ahamed Hasan Mohamed**
TUKE, Faculty of Electrical Engineering and Informatics TUKE, Faculty of Electrical Engineering and Informatics