Help improve this page
To contribute to this user guide, choose the Edit this page on GitHub link that is located in the right pane of every page.
Using the Argo CD CLI with the managed capability
The Argo CD command line interface (CLI) works the same with the managed capability as it does with upstream Argo CD for most operations, but authentication and cluster registration differ.
Prerequisites
Install the Argo CD CLI following the upstream installation instructions
Configuration
Configure the CLI using environment variables:
-
Get the Argo CD server URL from the Amazon EKS console (under your cluster’s Capabilities page), or using the AWS CLI. The
https://prefix must be removed:export ARGOCD_SERVER=$(aws eks describe-capability \ --cluster-namemy-cluster\ --capability-namemy-argocd\ --query 'capability.configuration.argoCd.serverUrl' \ --output text \ --regionregion-code| sed 's|^https://||') -
Generate an account token from the Argo CD UI (Settings → Accounts → admin → Generate New Token), then set it as an environment variable:
export ARGOCD_AUTH_TOKEN="your-token-here"Important
This configuration uses the admin account token for initial setup and development workflows. For production use cases, use project-scoped roles and tokens to follow the principle of least privilege. For more information about configuring project roles and RBAC, see Configure Argo CD permissions.
-
Set the required gRPC option:
export ARGOCD_OPTS="--grpc-web"
With these environment variables set, you can use the Argo CD CLI without the argocd login command.
Key differences
The managed capability has the following CLI limitations:
-
argocd admincommands are not supported (they require direct pod access) -
argocd loginis not supported (use account or project tokens instead) -
argocd cluster addrequires the--aws-cluster-nameflag with the EKS cluster ARN
Example: Register a cluster
Register an EKS cluster for application deployment:
# Get the cluster ARN CLUSTER_ARN=$(aws eks describe-cluster \ --namemy-cluster\ --query 'cluster.arn' \ --output text) # Register the cluster argocd cluster add $CLUSTER_ARN \ --aws-cluster-name $CLUSTER_ARN \ --name in-cluster \ --project default
For more information about the Argo CD CLI, see the Argo CD CLI reference