In this lesson, you will learn how to extend your Argo CD control plane to orchestrate and manage resources across multiple remote Kubernetes clusters.
The Hub-and-Spoke Model
When scaling applications, you often move beyond a single cluster into segmented environments (e.g., prod-us-east, prod-eu-west, or staging-cluster). Rather than installing a full Argo CD instance in every location, we use a central "Hub" cluster. By registering remote "Spoke" clusters, you can push manifests from a single Git repository to various destinations while maintaining a unified dashboard for status and drift detection.
Registering a Remote Cluster
Argo CD interacts with remote clusters via the argocd cluster add command. This process performs two critical tasks: it injects a ServiceAccount into the remote cluster and creates a Secret in the argocd namespace of your control plane. This secret contains the credentials necessary for the Argo CD Controller to communicate with the remote API server.
To register a cluster that is already configured in your local kubeconfig, run:
# Register the cluster context named 'prod-cluster'
argocd cluster add prod-cluster --name production-env
Once registered, you can target this cluster within your Application manifest. In your GitOps repository, you simply update the destination block:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-app-prod
spec:
destination:
server: https://<remote-cluster-api-url> # Or use the 'name' field
namespace: default
project: default
source:
repoURL: https://github.com/my-org/my-app.git
path: k8s/overlays/prod
Managing Global State
By decoupling the destination cluster from the application source, you can promote the same application manifest to different clusters simply by changing the destination.server field. Argo CD will continuously monitor the state of each remote cluster, reporting back to your central UI if the actual live state deviates from the version-controlled manifests stored in Git.
Key Takeaway: Registering remote clusters allows you to centralize your GitOps control plane, enabling consistent, multi-cluster deployments while maintaining visibility and automated drift detection across your entire infrastructure footprint.