Configure an Argo CD ApplicationSet with the Matrix generator combining cluster and git generators to fan out applications across multiple clusters and directories
Define the Matrix generator in the ApplicationSet spec with two nested generators: a clusters generator referencing your cluster secrets and a git directories generator pointing to your app path structure
Set template parameters using generator output variables such as cluster server URL, cluster name, and git directory path to construct unique application names and destination namespaces
Add a syncPolicy with automated prune and selfHeal, and configure ignoreDifferences for fields like replicas that are managed externally by HPA
Apply the ApplicationSet manifest to the Argo CD namespace and verify the generated Application objects via the Argo CD UI or CLI
Validate that each cluster received its corresponding application and that sync status is healthy across the matrix product of clusters and directories
Known gotchas
Matrix generators multiply output — a 5-cluster by 10-directory matrix produces 50 Applications; ensure your Argo CD instance has sufficient resource capacity and API rate limits are not hit
If a cluster generator references a secret label selector, clusters without that label are silently excluded; always verify the cluster list matches expectations before relying on the matrix output
The inner generator order matters: the first generator's output becomes the outer loop and its variables must not conflict with the second generator's variable names or they will be overwritten
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