← All insightsIntegration

How to use Argo Workflows with Argo CD

CodeWizard Academy · 14 April 2025 · 3 min read · Intermediate

Argo Workflows and Argo CD are a common pairing in a modern DevOps stack. Here is how they fit together and a practical way to wire them up.

Where Argo Workflows fits

Argo Workflows runs container-native, DAG or step-based workflows directly on Kubernetes - great for CI, data processing and ML pipelines where each step is a container.

yaml
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata: { generateName: build- }
spec:
  entrypoint: main
  templates:
    - name: main
      dag:
        tasks:
          - { name: build, template: run, arguments: { parameters: [{ name: cmd, value: make build }] } }
          - { name: test,  template: run, dependencies: [build], arguments: { parameters: [{ name: cmd, value: make test }] } }
    - name: run
      inputs: { parameters: [{ name: cmd }] }
      container: { image: alpine, command: [sh, -c], args: ['{{inputs.parameters.cmd}}'] }

Where Argo CD fits

Argo CD is a Kubernetes controller that continuously compares the live cluster to manifests in Git and syncs any drift, giving you declarative, auditable, self-healing deployments.

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]

Making them work together

  • Set limits and activeDeadlineSeconds on templates
  • Use workflow GC (TTL) to clean up finished runs
  • Adopt app-of-apps to manage many Applications declaratively
  • Enable selfHeal + prune so the cluster always matches Git

Want this pairing set up properly, with docs and handover? That is exactly the kind of work CodeWizard's embedded senior engineers do - and both Argo Workflows and Argo CD have active community groups you can join for free.

Like where this is going?

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

Book a free consult