ArgoCD GitOps Guide¶
This document explains how to install, configure, and use ArgoCD to manage LocalCloudLab deployments using GitOps.
1. Install ArgoCD¶
kubectl create namespace argocd
kubectl apply -n argocd -f \
https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
2. Get ArgoCD Admin Password¶
kubectl -n argocd get secret argocd-initial-admin-secret \
-o jsonpath="{.data.password}" | base64 -d
3. Access ArgoCD UI¶
kubectl port-forward svc/argocd-server -n argocd 8080:443
Open browser:
https://localhost:8080
Login: - User: admin - Password: (from previous step)
4. Connect ArgoCD to GitHub Repo¶
ArgoCD UI → Settings → Repositories → Connect Repo
Provide:
- Repo URL
- SSH private key OR username/token
- Name it:
LocalCloudLab
5. Create ArgoCD Applications¶
Example for Search API:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: search-api
namespace: argocd
spec:
project: default
source:
repoURL: 'https://github.com/your/LocalCloudLab.git'
targetRevision: main
path: k8s/search-api
destination:
server: https://kubernetes.default.svc
namespace: search
syncPolicy:
automated:
prune: true
selfHeal: true
Repeat for:
- checkin-api
- postgres
- redis
- rabbitmq
- envoy gateway
- monitoring stack
6. How Jenkins Works with ArgoCD¶
Jenkins updates image tags in Git, ArgoCD detects it.
Workflow:
Jenkins → Git commit → ArgoCD auto-sync → Kubernetes
This is true GitOps.
7. Summary¶
You now have:
✔ Declarative deployments ✔ Automatic rollouts ✔ Automatic rollbacks ✔ Visual monitoring of all k8s components