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!