Ensure all target clusters are registered in Argo CD (via argocd cluster add or the Argo CD UI); the cluster generator reads from cluster Secrets in the argocd namespace.
Create an ApplicationSet resource with apiVersion: argoproj.io/v1alpha1, kind: ApplicationSet, and a generators list containing a clusters entry.
Use a selector under clusters (e.g., matchLabels: env: production) to restrict the generator to a subset of registered clusters rather than all clusters.
In the template section, define a standard Application spec using generator parameters such as {{name}} for the cluster name and {{server}} for the cluster API URL to construct unique Application names and destination servers.
Apply the ApplicationSet; the ApplicationSet controller creates one Argo CD Application per matching cluster automatically.
Monitor per-cluster Application sync status with argocd app list or in the Argo CD UI; use the ApplicationSet syncPolicy to control whether Applications auto-sync or require manual promotion.
Known gotchas
The cluster generator targets both the local in-cluster and registered remote clusters by default; add a label selector to exclude the local cluster if it should not receive the application.
The ApplicationSet controller uses the cluster Secret labels at creation time; if you add a label to an existing cluster Secret, the ApplicationSet does not retroactively create a new Application unless the ApplicationSet itself is updated or recreated.
Deleting an ApplicationSet deletes all Applications it created; configure syncPolicy.preserveResourcesOnDeletion to retain deployed resources in the cluster when the ApplicationSet is removed.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp