Managing Kubernetes applications with ArgoCD is already a game-changer — but what if you need to deploy the same app across 10 clusters, or generate dynamic app configs based on Git branches or Helm values?

That’s where ApplicationSets step in.


🚀 What is an ApplicationSet?

An ApplicationSet is a Kubernetes custom resource that tells ArgoCD how to automatically generate multiple Application resources from a template.

It’s like templating your ArgoCD apps — letting you define how they should be generated and where they should go.


🧩 Why Use ApplicationSets?

  • ✅ Deploy the same app to multiple clusters with one config
  • ✅ Automatically sync apps based on Git branches, directories, or PRs
  • ✅ Reduce copy-paste YAML chaos
  • ✅ Perfect for multi-tenant, multi-env, or multi-region deployments

📐 Common Use Cases

1. Multi-Environment Deployments

Want to deploy the same microservice to dev, staging, and prod?

Use a List Generator:

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: my-app-multi-env
spec:
  generators:
    - list:
        elements:
          - env: dev
          - env: staging
          - env: prod
  template:
    metadata:
      name: 'my-app-{{env}}'
    spec:
      project: default
      source:
        repoURL: https://github.com/my-org/my-apps
        targetRevision: HEAD
        path: '{{env}}/my-app'
      destination:
        server: https://kubernetes.default.svc
        namespace: my-app-{{env}}

2. Deploy Across Clusters

Use the Cluster Generator to deploy to all ArgoCD-connected clusters:

generators:
  - clusters: {}

Combine it with templating to target namespaces or labels dynamically.


3. Git Directory Generator

Generate apps based on folders in a repo. Perfect for mono-repos.

generators:
  - git:
      repoURL: https://github.com/my-org/my-apps
      revision: HEAD
      directories:
        - path: apps/*

🔄 Syncing Strategy

You can optionally enable auto-sync per app:

syncPolicy:
  automated:
    prune: true
    selfHeal: true

This ensures your generated apps not only get created — but also stay current with Git.


🛠️ Real-World Power

We use ApplicationSets in production at Dedico for:

  • Spinning up temporary review environments for every PR
  • Rolling out the same service to 20+ regions
  • Managing Helm charts per cluster
  • Keeping Git the single source of truth

It’s like Terraform’s for_each for your Kubernetes applications.


📎 Bonus: Combine with Argo Workflows

Imagine this:

  • Argo Workflows builds the app and updates a values file
  • ApplicationSets detect the change and auto-rollout to environments

Pure GitOps magic.


✅ Final Thoughts

ApplicationSets are one of the most powerful — yet underused — features in ArgoCD. Once you adopt them, you’ll wonder how you managed GitOps without them.

💬 Want help building out scalable GitOps strategies using ArgoCD, Helm, and Kustomize?

👉 Let’s Talk
👉 See Our Services


💡 Tip: You can version control your ApplicationSets too — treat them just like any other ArgoCD app.


---

Would you like to:
- Add diagrams or visuals to this post?
- Break it into a mini-series (e.g., Git Generator, Pull Request Generator)?
- Include live examples from your infra?

Let me know how far you want to take it!