argocd
Manage declarative GitOps CD workflows for Kubernetes
TLDR
Login to Argo CD server
List applications
SYNOPSIS
argocd command [subcommand] [flags]
argocd login SERVER [flags]
argocd app sync APP_NAME [flags]
argocd version [flags]
PARAMETERS
--auth-token TOKEN
Authentication token for API server.
--client-crt PATH
Client certificate file for authentication.
--client-crt-key PATH
Client certificate key file for authentication.
--config PATH
Path to the Argo CD config file (default: ~/.config/argocd/config.yaml).
--grpc-web
Enable gRPC-web client.
--help, -h
Show help for a command or subcommand.
--insecure
Skip server certificate validation.
--logformat FORMAT
Log format (text|json).
--loglevel LEVEL
Set the logging level. One of: debug, info, warn, error.
--server SERVER
Argo CD API server address.
--sso-port PORT
Port for the local SSO callback server.
--username USERNAME
Username for API server authentication.
DESCRIPTION
argocd is the command-line interface (CLI) for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. It allows users to interact directly with the Argo CD API server to manage the lifecycle of applications, projects, repositories, and clusters.
With the argocd CLI, users can perform a wide range of operations, including creating, syncing, deleting, and retrieving detailed information about applications. It provides functionalities to inspect application health, view resource differences between Git and live clusters, trigger manual synchronizations, and manage authentication tokens. The CLI is an essential tool for administrators and developers working with Argo CD, offering a powerful and programmatic way to automate and script GitOps workflows, ensuring that application deployments on Kubernetes clusters align with their desired state defined in Git repositories.
CAVEATS
Version Compatibility: It is recommended to use an argocd CLI version that is compatible with the Argo CD server version to avoid unexpected behavior or API mismatches.
Authentication: Most commands require authentication against the Argo CD API server. Users must either log in using argocd login or provide authentication details (e.g., token, username/password) via flags.
Network Connectivity: The CLI requires network connectivity to the Argo CD API server. Issues with firewalls, network policies, or server availability can prevent successful command execution.
Permissions: The actions performable by the CLI are governed by the user's role-based access control (RBAC) permissions configured on the Argo CD server. A user might not have the necessary permissions to execute certain commands or access specific resources.
COMMON USAGE PATTERNS
Logging In: argocd login ARGOCD_SERVER_ADDRESS establishes an authenticated session with the Argo CD API server.
Managing Applications: Commands like argocd app list, argocd app get APP_NAME, and argocd app sync APP_NAME are frequently used to monitor and manage application deployments.
Inspecting Resources: argocd app diff APP_NAME and argocd app logs APP_NAME provide insights into the application's state and runtime behavior.
SCRIPTING AND AUTOMATION
The argocd CLI is designed to be highly scriptable, making it suitable for integrating into CI/CD pipelines, automated workflows, and custom operational scripts. Its consistent command structure and JSON output options for many commands facilitate programmatic interaction.
HISTORY
The argocd command-line interface is an integral part of the Argo CD project, which was originally developed and open-sourced by Applatix (later acquired by Intuit). Argo CD gained significant traction as the GitOps methodology matured, becoming a prominent tool within the Cloud Native Computing Foundation (CNCF) landscape. The CLI has evolved alongside the Argo CD server, continuously adding new features and improving usability to support the growing demands of declarative, GitOps-driven application delivery on Kubernetes. Its development is driven by a vibrant open-source community, ensuring it remains a powerful and up-to-date tool for managing complex application deployments.