Overview
Argo CD manages external Kubernetes clusters by storing their credentials in Secrets with the labelargocd.argoproj.io/secret-type: cluster. This guide covers declarative cluster configuration, authentication methods, and EKS-specific setup.
Cluster Secret Structure
Cluster credentials are stored in Secrets with the following required fields:string
required
Cluster display name in Argo CD
string
required
Cluster API server URL
JSON
required
JSON configuration containing authentication and TLS settings
string
Comma-separated list of accessible namespaces. Setting this will cause cluster-level resources to be ignored unless
clusterResources is true.boolean
Whether Argo CD can manage cluster-level resources. Only applies when
namespaces is set.string
Designate this as a project-scoped cluster
Basic Cluster Configuration
Authentication Methods
Bearer Token Authentication
Basic Authentication
AWS IAM Authentication
For AWS EKS clusters:Exec Provider Configuration
Use external commands to supply credentials:Namespace-Scoped Clusters
Restrict cluster access to specific namespaces:When
namespaces is set, Argo CD performs a separate list/watch operation for each namespace. Increase ARGOCD_K8S_CLIENT_MAX_IDLE_CONNECTIONS if needed.Skipping Cluster Reconciliation
Prevent the application controller from reconciling apps on a cluster:EKS Clusters with IRSA
Configure EKS clusters using IAM Roles for Service Accounts:Service Account Annotations
Annotate the Argo CD service accounts with the management role:Config Field Reference
Theconfig field accepts a JSON object with the following structure:
CLI Management
Adding a Cluster
Removing a Cluster
The
in-cluster cluster cannot be removed via CLI. To disable it, set cluster.inClusterEnabled: "false" in the argocd-cm ConfigMap.Best Practices
Use IRSA for EKS
Leverage IAM Roles for Service Accounts for secure, credential-free authentication to EKS clusters.
Namespace Restrictions
Use namespace scoping to limit cluster access and improve security.
TLS Verification
Always set
insecure: false and provide caData for production clusters.Skip Reconciliation
Use the skip-reconcile annotation for maintenance windows or debugging.