The Problem
Running one cluster is easy. Running the same application consistently across AWS EKS, Azure AKS, and a few environments each is where things fall apart. Teams end up hand-copying ArgoCD Applications per cluster, the copies drift, and a fix that landed on EKS never reaches AKS. The goal is a single Git source of truth that fans out to every cluster and keeps them identical. ArgoCD's ApplicationSet controller does exactly that: it templates Applications from a generator so adding a cluster is a one-line change.
Instead of N copies of an Application, you keep one ApplicationSet and let a generator produce the per-cluster, per-environment copies for you.
Repository Structure
A clean multi-cloud repo separates the shared app definition from per-cluster values:
deploy/
├── applicationsets/
│ └── billing-appset.yaml # one ApplicationSet, generates all copies
├── base/
│ └── billing/ # Kustomize base — identical everywhere
│ ├── deployment.yaml
│ ├── service.yaml
│ └── kustomization.yaml
└── overlays/
├── eks-prod/ # cloud/env-specific patches
│ └── kustomization.yaml
├── eks-staging/
│ └── kustomization.yaml
├── aks-prod/
│ └── kustomization.yaml
└── aks-staging/
└── kustomization.yaml
The base is the single definition of the app. Each overlay holds only what differs per cluster — a replica count, an ingress class, a cloud-specific storage class.
ApplicationSet Generators
An ApplicationSet produces Applications from a generator. Three cover almost every multi-cloud case:
| Generator | Produces one Application per... | Use when |
|---|---|---|
| <strong>cluster</strong> | registered ArgoCD cluster | you want apps to follow your fleet automatically |
| <strong>list</strong> | hard-coded entry you list | you want explicit, reviewed control |
| <strong>git</strong> | folder or file found in a repo | overlays define the matrix in Git |
Cluster Generator — Follow the Fleet
The cluster generator reads clusters registered in ArgoCD and templates an Application for each. Register EKS and AKS once, and new clusters are picked up automatically:
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: billing
namespace: argocd
spec:
generators:
- clusters:
selector:
matchLabels:
environment: prod
template:
metadata:
name: 'billing-{{name}}'
spec:
project: platform
source:
repoURL: https://github.com/devopskit/deploy.git
targetRevision: main
path: 'overlays/{{metadata.labels.cloud}}-prod'
destination:
server: '{{server}}'
namespace: billing
syncPolicy:
automated:
prune: true
selfHeal: true
Each cluster is labeled cloud: eks or cloud: aks, and the template picks the matching overlay path. Add a third cloud later and it just works.
List Generator — Explicit Control
When you want every target spelled out and reviewed, the list generator is the clearest:
spec:
generators:
- list:
elements:
- cluster: eks-prod
url: https://eks-prod.example.com
cloud: eks
- cluster: aks-prod
url: https://aks-prod.example.com
cloud: aks
template:
metadata:
name: 'billing-{{cluster}}'
spec:
source:
repoURL: https://github.com/devopskit/deploy.git
path: 'overlays/{{cloud}}-prod'
targetRevision: main
destination:
server: '{{url}}'
namespace: billing
Git Generator — The Overlay Folders Decide
The git generator discovers targets from the repo itself. Point it at overlays/* and every overlay folder becomes an Application — adding a cluster is just adding a folder:
spec:
generators:
- git:
repoURL: https://github.com/devopskit/deploy.git
revision: main
directories:
- path: overlays/*
Keeping Clouds Consistent
The payoff of this structure is uniform governance:
- One change, everywhere. Edit the base and every cluster converges on the next sync.
- Drift is corrected per cluster.
selfHealruns independently on each target, so a manual change on AKS does not affect EKS. - Policy travels with the app. Pair this with Kyverno policies delivered the same way so EKS and AKS enforce identical rules.
- Rollback is a revert. One Git revert rolls back all clusters at once, or scope it to one overlay.
Common Mistakes to Avoid
- Copying Applications per cluster by hand. That is the exact drift problem ApplicationSets solve. Template them instead.
- Putting cloud-specific values in the base. The base must be identical everywhere; anything that differs belongs in an overlay.
- One ApplicationSet mixing prod and staging without guards. A bad template change can hit every cluster at once. Separate prod and non-prod ApplicationSets or use progressive sync.
- Hard-coding cluster URLs in many places. Register clusters in ArgoCD and let the cluster generator supply the URL and labels.
- Ignoring cloud differences in storage/ingress. EKS and AKS have different default storage classes and load balancer annotations; handle these in overlays, not by forking the base.
FAQ
What is an ApplicationSet?
An ApplicationSet is an ArgoCD controller that generates multiple Application resources from a single template plus a generator. Instead of maintaining one Application per cluster or environment, you maintain one ApplicationSet and the controller produces and keeps the copies in sync as your fleet changes.
Which generator should I use for multi-cloud?
The cluster generator is ideal when you want apps to follow your registered fleet automatically, while the list generator gives explicit, reviewed control over each target. The git generator is handy when your overlay folders already define the deployment matrix, so adding a folder adds a target.
How do I handle differences between EKS and AKS?
Keep the shared app in a Kustomize base and put each cloud's differences — storage classes, ingress annotations, replica counts — in per-cloud overlays. The ApplicationSet points each generated Application at the correct overlay, so the base stays identical while cloud specifics stay isolated.
Can one Git revert roll back all clusters?
Yes. Because all clusters pull from the same Git source of truth, reverting a commit causes every affected cluster to reconcile back to the previous state on its next sync. You can also scope a change to a single overlay to roll back just one cloud or environment.