ArgoCD › Multi-cluster

How do you target a subset of clusters (e.g., only production)?

Intermediate

Answer

Label registered clusters (e.g., env=prod, region=eu) and use a cluster generator selector with matchLabels/matchExpressions to include only matching clusters. This lets one ApplicationSet deploy to just the intended fleet subset and automatically include new clusters that match the labels.
generators:
  - clusters:
      selector:
        matchLabels: { env: prod }
Real-world example A monitoring stack ApplicationSet deploys only to clusters labeled env=prod via the selector.

Common follow-ups: Where are cluster labels set? | How does matchExpressions differ from matchLabels?