← All insightsAutomation

Automating Argo CD from scratch

CodeWizard Academy · 17 June 2026 · 3 min read · Intermediate

Anything you do to Argo CD twice should be automated. This walks the path from a manual install to a repeatable, pipeline-driven setup.

1. Install it reproducibly

bash
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl -n argocd get pods

2. Describe the desired state

An Application that tracks a Git path and self-heals.

yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata: { name: web, namespace: argocd }
spec:
  project: default
  source:
    repoURL: https://github.com/acme/deploy.git
    targetRevision: main
    path: apps/web
  destination:
    server: https://kubernetes.default.svc
    namespace: web
  syncPolicy:
    automated: { prune: true, selfHeal: true }
    syncOptions: [CreateNamespace=true]

3. Run it from CI

CI only updates the image tag in Git; Argo CD does the deploy.

yaml
bump-image:
  script:
    - yq -i '.image.tag = strenv(CI_COMMIT_SHA)' apps/web/values.yaml
    - git commit -am "web $CI_COMMIT_SHA" && git push

Want senior help putting Argo CD to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult