Skip to content

HrushiYadav/argocd-gitops

Repository files navigation

ArgoCD GitOps

GitOps-based Kubernetes deployment for portfolio projects using ArgoCD. Deploys applications to a local Kind cluster using the App of Apps pattern with ApplicationSets.

ArgoCD Dashboard

What is this?

A production-style GitOps setup that you can run entirely on your laptop. It demonstrates how to manage multiple Kubernetes applications declaratively using ArgoCD -- the same patterns used at companies running hundreds of microservices.

This repo serves as:

  • A learning resource -- understand how ArgoCD, Helm, ApplicationSets, and the App of Apps pattern work together in practice, not just theory
  • A starter template -- fork it, swap in your own apps, and you have a working GitOps pipeline
  • A portfolio piece -- shows real-world Kubernetes/DevOps skills with a running local demo

What's inside

GitOps Patterns

Pattern What it does Why it matters
App of Apps A single root Application bootstraps everything else One kubectl apply sets up your entire platform
ApplicationSets Git generator auto-discovers apps from apps/**/deploy.yaml Add a new app by dropping a file -- no ArgoCD config changes needed
Self-managing ArgoCD ArgoCD manages its own installation via a Kustomize overlay ArgoCD upgrades are just a git commit
Helm charts per app Each app has its own chart with Deployment + Service Standard packaging that works anywhere

Applications Deployed

App What it is Stack Port
ds-agents Multi-agent data science system with RL training Python, Streamlit, LangGraph, Azure OpenAI 8501
portfolio Personal portfolio website Next.js 16, React 19, TypeScript 3000

Infrastructure

Component Purpose
Kind Local Kubernetes cluster (runs in Docker)
ArgoCD v2.13 GitOps continuous delivery
Kustomize ArgoCD installation management
Helm Application packaging and templating
Docker Container images for each app

Architecture

Kind Cluster (argocd-demo)
    |
    v
ArgoCD (argocd namespace)
    |
    +--- root Application (projects/local/)
              |
              +--- AppProject "apps"
              |
              +--- ApplicationSet "portfolio-apps"
                        |
                        +--- scans apps/**/deploy.yaml
                        |
                        +--- ds-agents    (charts/ds-agents)    -> port 8501
                        +--- portfolio    (charts/portfolio)    -> port 3000

How the GitOps flow works

  1. Bootstrap: bootstrap.sh creates a Kind cluster and installs ArgoCD
  2. Root Application watches projects/local/ and auto-syncs
  3. ApplicationSet uses a Git generator to scan apps/**/deploy.yaml
  4. Each deploy.yaml specifies a Helm chart path and value overrides
  5. ArgoCD renders the Helm chart and deploys to the cluster
  6. Push to main -- ArgoCD detects the change and auto-syncs

Prerequisites

Quick Start

1. Bootstrap the cluster

./scripts/bootstrap.sh

This creates a Kind cluster, installs ArgoCD, and applies the root application.

2. Build and load app images

./scripts/build-images.sh

Builds Docker images for both apps and loads them into Kind.

3. Access ArgoCD UI

kubectl port-forward -n argocd svc/argocd-server 9292:443

Open https://localhost:9292

Username admin
Password (printed by bootstrap.sh)

4. Access the apps

Portfolio:  http://localhost:3000
DS-Agents:  http://localhost:8501

Adding a new app

  1. Create a Helm chart in charts/<app-name>/
  2. Add apps/<app-name>/deploy.yaml with helmChartPath and value overrides
  3. Add a Dockerfile in dockerfiles/<app-name>/
  4. Push to main -- ArgoCD auto-discovers and deploys it

No ArgoCD configuration changes needed. The ApplicationSet picks it up automatically.

Project Structure

argocd-gitops/
├── apps/                           # App deploy configs (scanned by ApplicationSet)
│   ├── ds-agents/deploy.yaml
│   └── portfolio/deploy.yaml
│
├── charts/                         # Helm charts
│   ├── ds-agents/                  # Streamlit app chart
│   └── portfolio/                  # Next.js app chart
│
├── dockerfiles/                    # Dockerfiles for each app
│   ├── ds-agents/Dockerfile
│   └── portfolio/Dockerfile
│
├── bootstrap/clusters/local/       # ArgoCD bootstrap
│   ├── argo-cd/                    # Kustomize: ArgoCD install
│   ├── argo-cd.yaml                # ArgoCD self-manage
│   └── root.yaml                   # Root app-of-apps
│
├── projects/local/                 # ArgoCD projects + ApplicationSets
│   ├── project.yaml                # AppProject
│   └── appset.yaml                 # ApplicationSet (git generator)
│
└── scripts/
    ├── bootstrap.sh                # Cluster + ArgoCD setup
    ├── build-images.sh             # Build + load Docker images
    └── kind-config.yaml            # Kind cluster config

Cleanup

kind delete cluster --name argocd-demo

References

License

MIT

About

GitOps Kubernetes deployment with ArgoCD - App of Apps, ApplicationSets, Helm charts, Kind local cluster

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors