GitOps made simple: Deploying apps with Argo CD

GitOps promises to make deployments predictable: your Git repo is the single source of truth, and the cluster’s desired state follows automatically. Argo CD is one of the most popular tools that makes that promise real — and in the last couple of years it’s added a few practical building blocks that make everyday workflows (like preview environments, automated image updates, and safe rollouts) feel almost effortless. This article walks through those pieces and shows a compact, approachable pattern you can use today.

The three building blocks that matter

Think of deploying an app like putting on a concert: you need the stage (clusters), the set list (manifests in Git), and a stage manager who cues the band and the lights. In Argo’s world:

These three components combine into a workflow that balances automation with auditability: every change is a commit in Git, preview environments can spin up per PR, image updates can be automated or reviewed, and rollouts can be gated by real metrics.

A simple, real-world workflow

Imagine a team using GitHub: a developer opens a PR, CI builds an image and pushes it to a registry, and you want a preview environment (a per-PR URL) and a safe way to promote to staging/production.

Argo CD’s web UI and ApplicationSet preview features are also improving: the UI can show what Applications an ApplicationSet will generate, making the “what happens if I merge” question easier to answer before you actually create resources. (blog.argoproj.io)

Small YAML examples (safe, readable)

ApplicationSet (PR-generator style — simplified):

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: previews
spec:
  generators:
    - pullRequest:
        repoURL: https://github.com/your-org/your-app
        scmType: github
        filters:
          labels:
            - preview
  template:
    metadata:
      name: '-preview'
    spec:
      project: default
      source:
        repoURL: https://github.com/your-org/your-app
        path: overlays/preview
      destination:
        server: 'https://kubernetes.default.svc'
        namespace: preview-
      syncPolicy:
        automated: {}

Argo CD Image Updater (minimal ImageUpdater CR example):

apiVersion: argoproj.io/v1alpha1
kind: ImageUpdater
metadata:
  name: my-app-updater
spec:
  image: ghcr.io/your-org/your-app
  updateStrategy:
    semver: true
  target:
    repo: https://github.com/your-org/your-app-manifests
    path: overlays/preview
    field: image.tag

These snippets show the idea — generators produce apps, and an updater writes the new tag back to the manifests so Argo CD can sync.

What can go wrong (and how teams handle it)

Preview environments are delightful, but they can create resource sprawl: stale previews consume quotas and cost money. Common mitigations:

Community write-ups and operator docs highlight these tradeoffs and patterns for organizing repos and ApplicationSets at scale. They show how teams pick between “one repo, directories per environment” vs “branches per environment” and why ApplicationSet + generators can reduce boilerplate. (mguarinos.com)

A balanced note

GitOps with Argo CD is powerful precisely because it ties changes to Git commits — that gives auditability and reversibility. But it’s not a magic wand: preview environments, automated image updates, and progressive rollouts each add operational surface area (cleanup, permissions, observability). Treat them like tools in a musician’s kit: used thoughtfully, they let the band play tight; used without practice, the song can get noisy.

If you want a compact, low-friction pattern, start by using ApplicationSets for previews, add Image Updater for registry-driven commits when you’re comfortable, and gate public-facing releases with Argo Rollouts. The UX improvements to ApplicationSet previews in the Argo CD UI and the maturing Image Updater project make this pattern easier to manage today than it was a couple of years ago. (blog.argoproj.io)

References (selected)

Deployments should feel like a practiced set list: predictable, rehearsed, and enjoyable to run. Argo CD, with ApplicationSet, Image Updater, and Rollouts, gives you the tools to make that happen — as long as you keep the basics in tune: cleanup, permissions, and observability.