This repository contains a GitOps-based deployment setup for a full-stack application with frontend and backend components. The project leverages Kubernetes, Helm, and ArgoCD to automate application deployments and lifecycle management using Git as the source of truth.
This project demonstrates how to implement GitOps principles to achieve consistent, automated, and declarative deployments of a full-stack web application
- Frontend: React.js application
- Backend: Node.js REST API
- Infrastructure: Kubernetes cluster deployed via Helm charts
- Configuration management & deployment: GitOps workflow using ArgoCD and sealed secrets for secure handling of sensitive data
.
├── .github/ # GitHub-specific configurations
│ └── workflows/ # CI/CD pipeline definitions (build, test, deploy)
│
├── app/ # Application source code
│ ├── frontend/ # React frontend application
│ └── backend/ # Node.js backend application
│
├── myapp/ # Helm chart for Kubernetes deployment
│ ├── Chart.yaml # Helm chart metadata
│ ├── values.yaml # Default configuration values
│ └── templates/ # Kubernetes manifests (Deployments, Services, etc.)
│
├── docker-compose.yaml # Local development setup
├── README.md # Project documentation
└── LICENSE # License information
Before using this project, ensure you have the following installed and configured:
- Docker - for containerizing the applications
- Kubernetes cluster - local (e.g., minikube) or cloud
- Helm - package manager for Kubernetes
- ArgoCD - for GitOps continuous deployment
- Sealed Secrets controller - to manage secrets securely
To run the full application locally (both frontend and backend), simply use:
docker-compose upThis command builds and starts the frontend and backend services, allowing you to work on the app without deploying to Kubernetes.
The application is deployed to Kubernetes using Helm charts located in the myapp/ directory. This enables a declarative and parameterized deployment workflow.
- Customize deployment values in
myapp/values.yamlas needed. - Deploy using Helm with:
helm install myapp ./myapp
- Manage upgrades with Helm for subsequent releases.
- The application was created using the ArgoCD UI.
- ArgoCD automatically syncs cluster state with the Git repo, providing continuous deployment and rollback capabilities.
- Secrets are securely stored using Sealed Secrets; encrypted secrets are stored in Git safely.
The .github/workflows/ directory contains GitHub Actions workflows that:
- Build Docker images for frontend and backend
- Run tests
- Push container images to registry
- Update Helm chart versions or manifests for deployment
- Trigger ArgoCD syncs for GitOps deployment automation
- This project uses Sealed Secrets to encrypt secrets before committing to Git.
- Only the Sealed Secrets controller in the cluster can decrypt and apply these secrets securely.
| Command | Description |
|---|---|
docker-compose up |
Run frontend and backend locally |
helm install myapp ./myapp |
Deploy application to Kubernetes |
helm upgrade myapp ./myapp |
Upgrade deployed application |
kubectl -n argocd get applications |
Check ArgoCD application status |
kubectl get sealedsecrets |
List sealed secrets in cluster |