In this guide you’ll learn how a single ApplicationSet can generate multiple Argo CD Applications across several clusters by using generators. We focus on the list and clusters generators, showing examples and a practical demo that deploys an nginx application to all clusters known to Argo CD. ApplicationSets use generators to produce parameter sets which are rendered into the ApplicationSet template. Generators available include list, clusters, git, matrix, merge, and others. This article demonstrates the list and clusters generators and walks through deploying an nginx app across multiple clusters using the clusters generator.Documentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview: ApplicationSet generators
Use generators to produce parameter combinations for the ApplicationSet template. Typical use-cases:| Generator | Use case |
|---|---|
| list | Explicitly enumerate targets (key/value pairs). Best for small, known sets. |
| clusters | Discover clusters from Argo CD cluster secrets. Great for many clusters managed centrally. |
| git | Generate parameters from Git repo contents or branches. |
| matrix | Combine multiple generators to create Cartesian products of parameters. |
| merge | Merge results from multiple generators into a single parameter set. |
List generator
The list generator allows you to explicitly list cluster-like elements (key/value pairs). It’s ideal when you have a finite, known set of targets and you want precise control over each generated Application. Example ApplicationSet using the list generator:- The generator emits parameters (here
.clusterand.url) for each listed element. - The template uses those parameters to produce distinct Application resources. For example, with
cluster: engineering-devthe application name becomesengineering-dev-guestbook. - Add another element (e.g.,
engineering-prod) to generate an additional Application.
Cluster generator
The clusters generator discovers clusters registered with Argo CD (stored as cluster Secrets in the argocd namespace) and generates parameters from those secrets. This is the recommended approach if you manage many clusters and prefer automatic discovery. A basic clusters generator that selects clusters by label:.name, .server, and metadata fields that come from the cluster Secrets Argo CD creates when you add clusters.

argocd.argoproj.io/secret-type: cluster. An illustrative (decoded) example of such a Secret:
The clusters generator reads cluster Secrets in the argocd namespace and exposes fields like
.name and .server. Reference these generated parameters in your ApplicationSet template to target destinations automatically.Example: Deploy nginx to all clusters
This ApplicationSet example uses the clusters generator to deploy an nginx application to every cluster Argo CD knows about:generators: - clusters: {}tells Argo CD to generate one Application per discovered cluster.- The template uses
.namefor each generated Application’s name and.serverfor the destination cluster server URL (both supplied by cluster Secrets).
Applying the ApplicationSet and troubleshooting
If you attempt to apply an ApplicationSet before the ApplicationSet CRD and controller are installed, the apply will fail with a “no matches for kind” error. Example failure when CRDs are missing:If you target the wrong kubecontext (for example, a cluster without Argo CD installed), kubectl will not find the ApplicationSet CRD. Switch to the context that hosts Argo CD (e.g., your Docker Desktop or kind cluster) and re-run the apply after ensuring the ApplicationSet CRD and controller are installed.
Verify in the Argo CD UI
Inspect the generated Applications in the Argo CD web UI. Use search and filters to locate the nginx applications deployed across your clusters.
Further reading and references
- Official ApplicationSet docs: https://argoproj.github.io/argo-cd/operator-manual/applicationset/
- Argo CD documentation: https://argo-cd.readthedocs.io/
- ApplicationSet controller repo and examples: https://github.com/argoproj-labs/applicationset