This repository demonstrates a project where I designed and implemented the deployment of a simple web application to Kubernetes clusters using modern DevOps tools and GitOps principles. The project covers the complete CI/CD pipeline from building and testing container images to deploying on both Google Kubernetes Engine (GKE) (production) and Civo Kubernetes (staging).
This project involves:
- Building and deploying a web application composed of the following microservices:
- API-Golang: Backend written in Go.
- API-Node: Backend written in Node.js.
- Client-React: Frontend React application.
- Load-Generator: Python-based load testing service.
- PostgreSQL: Database for application data.
- Deployments were automated using GitHub Actions, Traefik Ingress, and Kluctl GitOps.
- Containerization: Docker for building multi-arch container images.
- CI/CD Pipelines: GitHub Actions for automating build, test, and deployment processes.
- GitOps: Kluctl for managing Kubernetes manifests and deployments.
- Orchestration: Kubernetes for running microservices, Traefik as an ingress controller.
- Cloud Platforms:
- Google Kubernetes Engine (GKE) for production.
- Civo Kubernetes for staging.
- Development Tools:
- Devbox & Nix for dependency management.
- kubectl and kubectx for Kubernetes configuration and context switching.
-
Microservices Architecture:
- Each service has a dedicated Kubernetes Deployment, Service, and ConfigMap/Secret.
- Clear separation of concerns between staging and production environments.
-
Ingress Routing:
- Traefik was used to manage ingress routes for staging and production environments.
- Custom IngressRoute configurations ensure seamless routing to the services.
-
Automated CI/CD Pipelines:
- CI pipelines build, tag, and push container images to Docker Hub using GitHub Actions.
- CD pipelines deploy images to staging and production Kubernetes clusters using Kluctl.
-
GitOps Workflow:
- Declarative Kubernetes manifests are managed in the repository.
- Environments are deployed by targeting specific configurations (e.g.,
staging.yaml
orproduction.yaml
).
- Build Stage: GitHub Actions build container images, tag them semantically, and push them to Docker Hub.
- Staging Deployment: Kluctl deploys the latest images to the Civo Kubernetes staging cluster.
- Production Deployment: Upon approval, the pipeline deploys the tested changes to GKE for production.
GitHub Actions CI/CD Pipeline
├── Build Multi-arch Images (Docker)
├── Push to Docker Hub
├── Deploy to Staging (Civo Kubernetes)
├── Deploy to Production (Google Kubernetes Engine)
- Kubernetes Manifests:
- Located in the
deployment-env/kluctl/
directory. - Includes namespaces, ingress routes, and service configurations.
- Located in the
- CI/CD Pipelines:
- Configured in
.github/workflows
. - Includes build, deploy, and update workflows.
- Configured in
- Environment Configurations:
- Environment-specific variables and settings in
config/
.
- Environment-specific variables and settings in
I started this project to demonstrates the potential of several DevOps tools and my ability to:
- Architect scalable and efficient Kubernetes deployments in multi-cloud environment using Cloud APIs, Kubectl, Kubectx etc
- Automate comples CI/CD pipelines with modern DevOps tools like Github action, Kluctl GitOps, Helm Charts
- Apply GitOps principle in managing cloud-native applications
- Deliver reliable and secure web applications in production.
- Carry out container orchestration, ingress management, and declarative infrastructure.
Feel free to explore the repository and reach out with any questions!