zkt25/sk1
2025-04-25 11:37:43 +00:00
..
aks-cluster.sh add folders 2025-04-25 11:37:43 +00:00
app.py add folders 2025-04-25 11:37:43 +00:00
deployment.yaml add folders 2025-04-25 11:37:43 +00:00
Dockerfile add folders 2025-04-25 11:37:43 +00:00
ingress.yaml add folders 2025-04-25 11:37:43 +00:00
namespace.yaml add folders 2025-04-25 11:37:43 +00:00
prepare-app.sh add folders 2025-04-25 11:37:43 +00:00
README.md add folders 2025-04-25 11:37:43 +00:00
remove-app.sh add folders 2025-04-25 11:37:43 +00:00
requirements.txt add folders 2025-04-25 11:37:43 +00:00
service.yaml add folders 2025-04-25 11:37:43 +00:00
statefulset.yaml add folders 2025-04-25 11:37:43 +00:00

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