Blog Application - Deployment on Azure AKS ========================================== Application Description ------------------------ A simple Flask blog app allowing users to create, view, and delete articles. Articles are stored persistently in PostgreSQL. Cloud & Technologies Used -------------------------- - Cloud: Microsoft Azure (AKS for orchestration, ACR for Docker images) - Stack: Flask, PostgreSQL, Docker, Kubernetes - Kubernetes Objects: - Namespace, Deployment (Flask), StatefulSet (PostgreSQL), PVC, Services File Overview ------------- | File | Description | |--------------------|------------------------------------------------------------| | app.py | Flask app logic | | Dockerfile | Defines Flask app image | | requirements.txt | Python dependencies | | namespace.yaml | Creates a K8s namespace | | deployment.yaml | Deploys the Flask app | | statefulset.yaml | Deploys PostgreSQL with persistent volume | | service.yaml | Exposes app and DB services | | aks-cluster.sh | Creates AKS cluster and sets up infra | | prepare-app.sh | Builds image, deploys app and services | | remove-app.sh | Tears down all K8s components | | README.md | This documentation | Deployment Instructions ------------------------ 1. Set up infrastructure ./aks-cluster.sh 2. Deploy the app ./prepare-app.sh 3. Access the app Open the external IP in your browser (output by the script) 4. Remove everything ./remove-app.sh Requirements ------------ - Azure account, Azure CLI - kubectl & Docker installed locally Notes ----- - PostgreSQL uses a persistent volume (data survives restarts) - The Flask app restarts automatically on failure - All deployments are fully scripted via shell & YAML Sources & Tools --------------- - Flask documentation: https://flask.palletsprojects.com/ - Kubernetes documentation: https://kubernetes.io/