Setting Up ArgoCD for GitOps Deployments
ArgoCD is a declarative GitOps continuous delivery tool for Kubernetes. It monitors your Git repositories and automatically synchronizes your cluster state to match the desired configuration defined in code.
Install ArgoCD
Deploy ArgoCD into your Kubernetes cluster on your Breeze:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
Access the Dashboard
Expose the ArgoCD server and retrieve the initial admin password:
kubectl port-forward svc/argocd-server -n argocd 8080:443
argocd admin initial-password -n argocd
Connect a Git Repository
argocd login localhost:8080
argocd repo add https://github.com/your-org/k8s-manifests.git \
--username git --password your_token
Create an Application
argocd app create my-app \
--repo https://github.com/your-org/k8s-manifests.git \
--path apps/my-app \
--dest-server https://kubernetes.default.svc \
--dest-namespace production \
--sync-policy automated \
--auto-prune \
--self-heal
Key Features
- Automated Sync -- detects Git changes and applies them
- Self-Healing -- reverts manual cluster changes to match Git
- Auto-Prune -- removes resources deleted from Git
- Rollback -- instantly revert to any previous Git commit
ArgoCD provides a powerful web UI for visualizing application state, sync status, and resource health across all your deployments.