Back to results for “Applications”
ArgoCD › Multi-cluster

How do you add (register) an external cluster to ArgoCD?

Beginner

Answer

Use `argocd cluster add <context>` (which creates a service account and stores credentials as a cluster Secret), or declaratively create a cluster Secret with the API URL, credentials, and the argocd.argoproj.io/secret-type: cluster label. ArgoCD then lists it as a deployment destination.
kind: Secret
metadata:
  labels:
    argocd.argoproj.io/secret-type: cluster
stringData:
  server: https://remote-api
  config: '{"bearerToken":"...","tlsClientConfig":{...}}'
Real-world example A new prod cluster is registered by applying a labeled cluster Secret, after which apps can target it.

Common follow-ups: What does argocd cluster add create? | How is a cluster defined declaratively?