ArgoCD › Multi-cluster

How does ApplicationSet auto-manage apps as clusters come and go?

Advanced

Answer

The cluster generator watches registered clusters; when one is added (matching the selector) it generates that cluster's Applications, and when one is removed it prunes them. This keeps the deployed app set aligned with the live cluster inventory automatically.
generators:
  - clusters:
      selector: { matchLabels: { env: prod } }
Real-world example Registering a new prod cluster automatically creates its apps; deregistering it removes them.

Common follow-ups: What triggers app creation/removal? | How does the selector scope this?