Signed-off-by: Drew Bailey <drew.bailey@airbnb.com> Co-authored-by: Drew Bailey <drew.bailey@airbnb.com>
1.7 KiB
Cluster Management
This guide is for operators looking to manage clusters on the CLI. If you want to use Kubernetes resources for this, check out Declarative Setup.
Not all commands are described here, see the argocd cluster Command Reference for all available commands.
Adding a cluster
Run argocd cluster add context-name.
If you're unsure about the context names, run kubectl config get-contexts to get them all listed.
This will connect to the cluster and install the necessary resources for ArgoCD to connect to it. Note that you will need privileged access to the cluster.
Skipping cluster reconciliation
You can stop the controller from reconciling a cluster without removing it by annotating its secret:
kubectl -n argocd annotate secret <cluster-secret-name> argocd.argoproj.io/skip-reconcile=true
The cluster will still appear in argocd cluster list but the controller will skip reconciliation
for all apps targeting it. To resume, remove the annotation:
kubectl -n argocd annotate secret <cluster-secret-name> argocd.argoproj.io/skip-reconcile-
See Declarative Setup - Skipping Cluster Reconciliation for details.
Removing a cluster
Run argocd cluster rm context-name.
This removes the cluster with the specified name.
Note
in-cluster cannot be removed
The
in-clustercluster cannot be removed with this. If you want to disable thein-clusterconfiguration, you need to update yourargocd-cmConfigMap. Setcluster.inClusterEnabledto"false"