Overview: ApplicationSet generators
Use generators to produce parameter combinations for the ApplicationSet template. Typical use-cases:
For more detail see the official ApplicationSet documentation: Argo CD ApplicationSet Controller.
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