ApplicationSet simplifies multi-cluster application orchestration: from one template and generator it automatically creates one or more Argo CD Applications. This topic explains how to use an ApplicationSet to create multiple applications.
Use this approach when:
-
Multi-environment deployments: Deploy the same application across production and staging with environment-specific configurations.
-
Cluster add-ons: Install shared tools (monitoring, logging, ingress) across a fleet of clusters.
-
Self-service deployments: Let teams deploy to clusters they own without modifying shared configuration.
How it works
The ApplicationSet controller processes your manifest in four steps:
-
The generator produces key-value parameters — in the List generator, each element becomes one parameter set.
-
The parameters are substituted into the template, once per parameter set.
-
Each rendered template becomes an Argo CD Application resource.
-
The Argo CD controller picks up the new Application resources and manages their sync lifecycle.
Prerequisites
Before you begin, make sure you have:
-
kubectl installed with kubeconfig for the target ACK One Fleet instance. Default path:
~/.kube/config.
Deploy an ApplicationSet
This example deploys echo-server to two clusters (production and staging), each with its own manifest subdirectory for environment-specific configuration.
Repository structure:
.
├── Dockerfile
├── go.mod
├── go.sum
├── main.go
└── manifests
└── directory
├── production
│ ├── deployment.yaml
│ └── service.yaml
└── staging
├── deployment.yaml
└── service.yaml
Create the ApplicationSet manifest
Create applicationset.yaml with the following content.
The List generator defines two parameter sets — one per cluster. {{cluster}} and {{url}} are substituted into the template, producing two Applications: production-echo-server and staging-echo-server. Each points to its environment's manifest subdirectory.
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: echo-server
spec:
generators:
- list:
elements:
- cluster: production
url: https://47.91.XX.XX:6443
- cluster: staging
url: https://47.111.XX.XX:6443
# To add more clusters, append another element here:
# - cluster: <cluster-name>
# url: <cluster-api-server-url>
template:
metadata:
name: '{{cluster}}-echo-server'
spec:
project: default
source:
repoURL: https://code.aliyun.com/shuwei.hsw/echo-server.git
targetRevision: main
path: manifests/directory/{{cluster}}
destination:
server: '{{url}}'
namespace: multi-echo-server
Apply the ApplicationSet
kubectl -n argocd apply -f applicationset.yaml
Verify application creation
kubectl -n argocd get application
Expected output:
NAME SYNC STATUS HEALTH STATUS
production-echo-server OutOfSync Missing
staging-echo-server OutOfSync Missing
OutOfSync indicates the Applications exist but are not yet deployed.
Sync the applications
argocd app sync production-echo-server staging-echo-server
Verify access
Test access to each environment after the sync completes.
Cluster Production (echo-server v1.0):
curl XX.XX.XX.XX:8080/version
Expected output:
"Hello Echo Server v1.0"
Cluster Staging (echo-server v2.0):
curl XX.XX.XX.XX:8080/version
Expected output:
"Hello Echo Server v2.0"
Replace XX.XX.XX.XX with the external IP of the echo-server Service in each cluster.
Next steps
-
Argo CD supports additional ApplicationSet generators (Cluster, Git, Matrix, and more). Start with List and Cluster generators.
-
See the full ApplicationSet specification.