Skip to main content
The argocd admin command provides a set of administrative utilities that require direct Kubernetes access rather than going through the Argo CD API server.
These commands require kubectl access to the cluster where Argo CD is installed and typically need cluster-admin or similar elevated permissions.

Quick Examples

Subcommands

dashboard

Start Argo CD Web UI locally without exposing the server.
Key Flags:
string
default:"localhost"
Listen address
integer
default:"8080"
Listen port
string
default:"argocd"
Argo CD namespace
Open your browser to http://localhost:8080 after running the command.

initial-password

Get the initial admin password from the cluster.
Output:
The initial password is stored in the argocd-initial-admin-secret Secret. Delete this secret after changing the admin password.

redis-initial-password

Ensure Redis password exists, creating one if necessary.

export

Export all Argo CD data including applications, projects, and settings.
What Gets Exported:
  • Applications
  • Application Projects
  • Repository credentials
  • Cluster credentials
  • Settings and configurations
Exported data includes sensitive information like credentials. Store backups securely.

import

Import Argo CD data from a file or stdin.
Key Flags:
boolean
Preview import without making changes
boolean
Delete resources not in the import file
string
default:"argocd"
Target namespace

Application Management

app generate-spec

Generate application manifest without creating it.
This is useful for:
  • GitOps: committing app manifests to Git
  • Validation: checking generated specs before applying
  • Templating: generating multiple similar applications

app diff-reconcile-results

Compare reconciliation results.

app get-reconcile-results

Get reconciliation results for debugging.

Cluster Management

cluster generate-spec

Generate cluster secret manifest.
string
required
Cluster server URL
string
Cluster name
string[]
Cluster labels
string
Service account name

cluster kubeconfig

Generate kubeconfig for accessing cluster via Argo CD.

cluster stats

Display cluster statistics.

cluster shards

Display cluster sharding information.

cluster namespaces

Manage cluster namespace configurations.

Project Management

proj generate-spec

Generate project manifest.

proj generate-allow-list

Generate resource allow list for project.

proj update-role-policy

Update project role policies.

Repository Management

repo generate-spec

Generate repository secret manifest.

Settings Management

settings validate

Validate Argo CD settings.

settings rbac

Validate and test RBAC policies.

settings rbac validate

Validate RBAC configuration.

settings rbac can

Test RBAC permissions.
Syntax:
  • subject: Username, role, or group (e.g., alice, role:admin, group:developers)
  • action: Action to test (e.g., get, create, update, delete, sync, override)
  • resource: Resource type (e.g., applications, clusters, repositories, projects)
  • object: Specific object (e.g., my-project/my-app, *)

settings resource-overrides

Manage resource customizations.

settings resource-overrides health

Test health assessment for resources.

settings resource-overrides ignore-differences

Test ignore differences configuration.

settings resource-overrides list-actions

List available resource actions.

settings resource-overrides run-action

Run a resource action.

Notifications

notifications template

Manage notification templates.

notifications trigger

Manage notification triggers.

Common Workflows

Backup and Restore

Local Development Setup

GitOps Application Manifests

Cluster Registration Script

RBAC Testing

Validate Configuration

Troubleshooting

Debug Initial Setup

RBAC Issues

Application Reconciliation

Best Practices

  • Regular Backups: Schedule regular exports of Argo CD configuration
  • Test Imports: Always use --dry-run before importing to production
  • Secure Backups: Exported data contains secrets; encrypt and store securely
  • RBAC Testing: Use rbac can command to validate policies before applying
  • Local Dashboard: Use admin dashboard for troubleshooting without exposing server
  • Generate Specs: Use generate-spec commands for GitOps workflows
  • Validate Settings: Run settings validate after configuration changes
  • Document Changes: Keep changelog of admin operations

Next Steps

Account Commands

Manage user accounts and passwords

App Commands

Manage applications