A production-grade, multi-container 3-tier microservices application stack containerized with Docker, automated via GitHub Actions CI/CD, and orchestrated on Kubernetes using Minikube.
| Kubernetes Deployment Status | GitHub Actions CI/CD Success |
|---|---|
![]() |
![]() |
| End-to-End API Verification | K8s Data Persistence Proof |
|---|---|
![]() |
![]() |
Modern cloud applications require robust microservice separation, automated continuous integration, resilient container orchestration, and self-healing storage solutions.
devops-k8s-3tier-app demonstrates end-to-end DevOps practices by implementing a 3-tier architecture:
- Presentation Layer: Nginx reverse proxy handling HTTP traffic routing and security header enforcement.
- Application Layer: Flask REST API running under a multi-worker Gunicorn WSGI server with MySQL connection pooling.
- Data Layer: MySQL 8.0 relational database with persistent storage volume claims.
This repository serves as a flagship portfolio piece showcasing real-world cloud engineering, Docker containerization, Kubernetes manifest design, and automated pipeline execution.
- π RESTful Microservices Backend: Clean REST API offering
/healthstatus monitoring and complete item CRUD endpoints. - β‘ Production-Ready WSGI & Connection Pooling: Powered by Gunicorn WSGI server and thread-safe MySQL connection pooling to prevent connection starvation.
- π‘οΈ Container Security & Isolation: Non-root container execution (
appuserUID 10001), security response headers in Nginx (X-Frame-Options,X-Content-Type-Options), and Kubernetes network isolation. - π¦ Docker Compose Local Development: One-command multi-container local startup with healthchecks and automatic container dependencies.
- βΈοΈ Kubernetes Minikube Deployment: Declarative K8s manifests specifying
Namespace,ConfigMaps,Secrets,PV/PVCstorage, health probes (readiness&liveness), resource limits, and service exposing (NodePort&ClusterIP). - π Automated CI/CD Pipeline: GitHub Actions workflow executing Pytest automated testing prior to building and pushing Docker images to DockerHub.
| Document | Description |
|---|---|
| π Architecture Specification | In-depth technical breakdown of network topology, tiers, security context, and K8s resources. |
| π Architectural Decision Records (ADRs) | Records of core technical decisions (Nginx proxy, Gunicorn WSGI, MySQL pool, NodePort). |
| π REST API Reference | Full endpoint documentation, request/response schemas, error codes, and cURL examples. |
| π οΈ Setup & Installation Guide | Detailed installation steps for Docker Compose local dev and Minikube K8s setup. |
| βοΈ Usage & Operations Guide | Operational workflows, cluster scaling commands, logging streams, and troubleshooting. |
| π» Development & Testing Guide | Guidelines for local Python virtualenvs, running Pytest suites, and container builds. |
- Backend: Python 3.11, Flask 3.0, Gunicorn 21.2
- Database: MySQL 8.0,
mysql-connector-python8.2 - Reverse Proxy: Nginx (Alpine)
- Containerization: Docker, Docker Compose
- Orchestration: Kubernetes (Minikube),
kubectl - Automation & Testing: Bash, Pytest, GitHub Actions
git clone https://github.com/sedmugen/devops-k8s-3tier-app.git
cd devops-k8s-3tier-app
cp .env.example .env
docker compose -f app/docker-compose.yml up -d --buildAccess the application at http://localhost/health.
chmod +x start.sh
./start.shSee docs/setup.md for detailed cluster setup and manifest validation procedures.
For full request/response payloads, see docs/api.md.
# Check health
curl -i http://localhost/health
# Create item
curl -i -X POST http://localhost/api/items \
-H "Content-Type: application/json" \
-d '{"name": "DevOps Portfolio", "description": "3-Tier Stack on K8s"}'
# List items
curl -i http://localhost/api/items
# Delete item
curl -i -X DELETE http://localhost/api/items/1- Gunicorn WSGI multi-worker integration
- Thread-safe MySQL connection pooling
- Non-root container security context (
appuserUID 10001) - Pytest automated test suite & CI/CD pipeline integration
- Ingress Controller with TLS cert-manager integration
- Prometheus & Grafana monitoring dashboards
This project is licensed under the MIT License - see the LICENSE file for details.
Developed & Maintained by sedmugen.




