ArgoCD — most popular GitOps tool for Kubernetes (CNCF graduated 2022). An agent in the cluster continuously compares Git state vs actual, applies diffs. Nice web UI with visualisation of health/sync status. Typical setup: 1 ArgoCD install manages multiple clusters/apps. Scale: Intuit uses ArgoCD for 1000+ apps. Alternatives: Flux CD (simpler, pull-based).
Below: details, example, related terms, FAQ.
Free online tool — HTTP header checker: instant results, no signup.
# App of apps bootstrap
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: bootstrap
spec:
source:
repoURL: git@github.com:me/manifests
path: apps/ # contains more Application CRDs
targetRevision: HEAD
destination: { server: https://kubernetes.default.svc, namespace: argocd }
syncPolicy: { automated: { prune: true } }ArgoCD operates on a client-server architecture, where the ArgoCD server interacts with both the Kubernetes API and the Git repository. The server is responsible for managing the application lifecycle and syncing state between the Git repository and the Kubernetes cluster.
At its core, ArgoCD consists of the following components:
ArgoCD utilizes a Declarative Configuration Model. Applications are defined using Kubernetes manifests stored in Git, ensuring that the desired state is always maintained. When discrepancies are found, the Application Controller applies the necessary changes to bring the cluster back to the desired state.
To get started with ArgoCD, follow these practical commands to install and configure your first application. This guide assumes you have a Kubernetes cluster and kubectl configured.
First, apply the ArgoCD installation manifest:
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yamlAfter installation, expose the ArgoCD API server:
kubectl port-forward svc/argocd-server -n argocd 8080:443Access the ArgoCD UI at http://localhost:8080. The default username is admin. Retrieve the initial password:
kubectl get pods -n argocd -l app.kubernetes.io/instance=argocd-server -o jsonpath='{.items[0].metadata.name}' | xargs -I {} kubectl exec -n argocd {} -c argocd-server -- argo-cd admin initial-passwordOnce logged in, create an application using the following command:
argocd app create my-app --repo https://github.com/my-org/my-repo.git --path k8s --dest-server https://kubernetes.default.svc --dest-namespace default3. Sync the Application
To sync the application and bring the cluster to the desired state, run:
argocd app sync my-app4. Monitor Application Status
Check the application's health and status:
argocd app get my-appBy following these commands, you can quickly set up and manage applications using ArgoCD, embracing the GitOps methodology.
Implementing ArgoCD effectively requires adherence to best practices that enhance performance, security, and maintainability. Here are several key practices to consider:
--sync-policy flag in your application configuration. This ensures that any changes in Git are automatically reflected in the cluster.By implementing these best practices, organizations can maximize the benefits of ArgoCD, leading to a more robust and efficient GitOps workflow.
ArgoCD: better UI, UI-driven adoption. Flux: simpler, native cross-cluster. Enterprise often ArgoCD (UI for devs). Platform teams often Flux.
ArgoCD manages multiple clusters from one UI. Needs credentials. Alternative — instance per cluster.
Default configs: ~1000 apps per instance. Large setups — shard controllers by clusters/projects.
Free plan — 10 monitors, checks every 5 min, no card required. Upgrade for 1-minute interval and multi-region monitoring.