# Calculator Web Application on Azure Kubernetes Service (AKS) --- ##Application Description This project is a simple web-based calculator that performs basic mathematical operations. It allows users to calculate expressions and save the results. A "Show History" button displays previously saved calculations. Built with: - Frontend: HTML/CSS/JavaScript served via Nginx - Backend: Flask (Python) application connected to a PostgreSQL database - Database: PostgreSQL 15 --- ##Public Cloud Environment - Provider: Microsoft Azure - Service Used: Azure Kubernetes Service (AKS) - Certificate Issuer: cert-manager with Let's Encrypt - Domain: https://aliscloudwork.tech --- ##Kubernetes and Cloud Components - Deployments: - Frontend Deployment (Nginx server) - Backend Deployment (Flask server) - PostgreSQL Deployment (Database server) - Services: - Frontend Service (ClusterIP) - Backend Service (ClusterIP) - PostgreSQL Service (ClusterIP) - Ingress Controller Service (LoadBalancer) - Ingress: - Ingress resource used to route traffic and enable HTTPS - Persistent Volume: - PostgreSQL database uses a Persistent Volume Claim (PVC) for data persistence - Certificate Management: - cert-manager with Let's Encrypt to generate HTTPS certificates automatically --- ##Files Included - prepare-app.sh: Script to deploy all Kubernetes objects and services automatically - remove-app.sh: Script to delete all Kubernetes objects and services - kubi/*.yaml: Kubernetes deployment, service, ingress, PVC configuration files - backend/Dockerfile: Dockerfile for the Flask backend application - frontend/Dockerfile: Dockerfile for the Nginx frontend application - frontend/default.conf: Nginx configuration file for routing - README.md: This documentation file --- ##How to View and Use the Application Open a web browser and visit: https://aliscloudwork.tech Use the calculator to perform operations. Click the "Show History" button to view saved calculations. --- ##Running Scripts - To deploy the application: - ```bash prepare-app.sh``` - To delete the application: - ```bash remove-app.sh``` --- ##External Sources and Tools Used - DockerHub for container images - Let's Encrypt for SSL certificates - cert-manager for Kubernetes certificate automation - Azure CLI for AKS management - Official documentation for Nginx, Flask, Kubernetes YAML syntax --- ##Final Notes - HTTPS is fully functional. - Kubernetes ensures all components are modular and recover automatically. - Database uses persistent storage for calculation history.