An end-to-end DevOps project built using Flask, Docker, Kubernetes (Minikube), Nginx, MySQL, and a GitHub Actions CI/CD pipeline.
This project demonstrates a complete DevOps workflow from local development to containerization and orchestration.
The application is containerized using Docker, deployed on Kubernetes (Minikube), connected to a MySQL database running in a separate pod, and exposed via a Kubernetes service.
It also includes a simple UI for user registration and login.
- Python Flask
- Docker
- Kubernetes (Minikube)
- MySQL
- Nginx
- GitHub Actions
- Linux (Ubuntu)
Client β Flask App (Pod) β MySQL (Pod)
β
Kubernetes Service
- User Registration
- User Login (with password hashing)
- Fetch all users
- Flask-based UI (Signup/Login)
- MySQL database integration
- Dockerized application
- Kubernetes deployment (multi-pod setup)
- CI/CD pipeline using GitHub Actions
.
βββ .github/workflows
β βββ ci.yml
βββ nginx
β βββ nginx.conf
βββ templates
β βββ index.html
βββ screenshots
βββ app.py
βββ deployment.yaml
βββ mysql.yaml
βββ Dockerfile
βββ docker-compose.yml
βββ requirements.txt
βββ README.md
minikube starteval $(minikube docker-env)docker build -t flask-devops-app .kubectl apply -f mysql.yamlkubectl apply -f deployment.yamlminikube service flask-appPOST /register
POST /login
GET /users
If the table does not exist, create it manually:
USE flask_app;
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100),
email VARCHAR(100) UNIQUE,
password TEXT
);GitHub Actions CI/CD automatically:
- Builds the Docker image
- Verifies the project setup
- Runs on every push to the main branch
Workflow file: .github/workflows/ci.yml
docker compose up --buildkubectl get podskubectl logs <pod-name>kubectl rollout restart deployment flask-appShows the Flask application signup screen used for user registration.
Demonstrates the application API responding successfully to requests.
Displays deployed Kubernetes pods for the Flask app and MySQL database.
Shows stored user data in the MySQL database.
- Docker containerization
- Kubernetes deployment and services
- Multi-pod architecture
- Backend β Database integration
- CI/CD basics with GitHub Actions
- Debugging real-world deployment issues
- Linux + terminal workflow
- Move credentials to Kubernetes Secrets
- Add JWT authentication
- Add HTTPS (SSL)
- Production setup using Gunicorn + Nginx
- CI/CD auto-deploy to cloud (AWS/GCP)
Harshit Malang



