📺 Demo Video: Deploy Microservices to Kubernetes KIND Cluster
This project demonstrates a complete microservices-based video-to-audio converter built using:
- Kubernetes (Kind)
- Helm Charts
- RabbitMQ
- PostgreSQL & MongoDB
- Taskfile for automation
- Python microservices
The system converts uploaded MP4 videos into MP3 audio and emails the result using a decoupled architecture with queues.
This branch introduces a temporary reply queue mechanism that allows the upload endpoint to immediately return the generated MP3 file ID (mp3-fid). This streamlines the workflow by making the mp3-fid readily available for use with the download endpoint.
Devbox simplifies your development environment using Nix. A devbox.json is included to help automate setup.
- Reproducible local development
- No manual installation of tools
- Easy provisioning on WSL or new systems
kubectl,kind,helm,taskpython311,pip,jq,curl,zip,gitmongosh,psql, and more
curl -fsSL https://get.jetpack.io/devbox | bash
cd your-project-directory/
devbox shellAdd more tools via
devbox add <tool>.
Taskfile is a YAML-based task runner like Makefile, used here to automate:
- Cluster creation
- Helm chart installs
- Microservice deployment
- API testing
# macOS
brew install go-task/tap/go-task
# Linux
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -dtask kind:01-create-cluster
task helm:install-all
task svc:install-all
task api:test-allLocated in:
kind-installation-and-setup/
Helm_charts/
src/
This project runs locally on a KIND (Kubernetes IN Docker) cluster with a custom configuration to support service exposure, Helm deployments, and local development.
Kind lets you spin up a full Kubernetes cluster inside Docker containers — no need for cloud services or VMs.
If running on windows, make sure Docker Desktop is installed.
kind-control-plane
kind-worker
kind-worker2
kind-worker3
Check:
kubectl get nodes -o wideConfig: kind-installation-and-setup/kind-config.yaml
kind create cluster or
task kind:01-create-clusterThis command:
Pulls a lightweight Kubernetes Docker image from docker hub
Starts a control plane node (as a Docker container)
Sets up kubectl context to point to the new cluster
| Service | Container | NodePort | Purpose |
|---|---|---|---|
| API Gateway | 5000 | 30002 | Login, upload, download endpoints |
| PostgreSQL | 5432 | 30003 | Used internally by auth-server |
| RabbitMQ Mgmt UI | 15672 | 30004 | Debug queue processing |
| MongoDB | 27017 | 30005 | File storage via GridFS |
Exposing services allows local tools (e.g., curl, browsers, psql) to communicate directly for testing/debugging.
cd kind-installation-and-setup/
task kind:01-create-cluster
cd ../Helm_charts/
task helm:install-all
cd ../src/
task svc:install-all
task api:test-allUpdate .env before running.
.
├── kind-installation-and-setup/
│ ├── kind-config.yaml
│ └── Taskfile.yml
├── Helm_charts/
│ ├── Postgres/
│ ├── MongoDB/
│ ├── RabbitMQ/
│ └── Taskfile.yml
├── src/
│ ├── auth/
│ ├── gateway/
│ ├── converter/
│ ├── notification/
│ ├── assets/
│ └── Taskfile.yml
├── .env
| Name | Role |
|---|---|
auth-server |
JWT login auth |
gateway-server |
API Gateway for user interaction |
converter-module |
Converts MP4 to MP3 using RabbitMQ |
notification |
Sends email with MP3 file ID |
RabbitMQ |
Message broker |
MongoDB |
Stores files via GridFS |
PostgreSQL |
Stores users, sessions |
curl -X POST http://localhost:30002/login -u email:passwordcurl -X POST -F 'file=@./video.mp4' -H "Authorization: Bearer <TOKEN>" http://localhost:30002/uploadcurl -o audio.mp3 -H "Authorization: Bearer <TOKEN>" "http://localhost:30002/download?fid=<id>"Configure Gmail via:
- Enable 2FA
- Create App Password
- Add credentials to
src/notification/manifest/secret.yaml
Modify values under:
Helm_charts/*/values.yaml
Services:
- PostgreSQL
- MongoDB
- RabbitMQ
task api:login
task api:upload
task api:download -- FILE_ID=<id>cd kind-installation-and-setup/
task kind:04-delete-clusterBased on: @N4si/microservices-python-app
Enhancements by Rabie:
- KIND support
- Taskfile automation
- Devbox env setup
- Improved testing by adding temporary queue to receive mp3 id as a return from video upload to be used for downloading, instead of getting the id from the email which broke the testing automation
- added liveness/readiness probes to svcs to enhance healing and observability
- added init containers to svc to wait for dbs and rmq to enhance reliability and forcing start ordering
- added pvc to postgres deploy so config can survive restarts
- fixed dbs storage config and make it more dynamic by using kind standard provisioner and removed un used storage classes
- enhanced the microservices codes by added while loop while connecting to rmq to enhance self healing when rmq crashes or restarts
- added extra mounts in kind to be used for pv/pvcs to simulate permanent storage for dbs and rmq
- enhanced notification service observability and reliability by checking the success of emailing as well as the existence of credentials
- enhanced postgres helm chart to add the init.sql to the deployment instead of manual running after deployment
- Documentation
Built with ❤️ by Rabie Rabie
📧 [email protected]
🔗 myresume.rabietech.dpdns.org
🐙 GitHub Profile
Open an issue or PR to contribute!

