Chris Straw
SHARE:

Getting Started with ArgoCD CLI: Login and Accessing the Admin Dashboard Locally

ArgoCD is one of the most popular GitOps tools for managing Kubernetes applications. While the dashboard is powerful, it isn’t always obvious how to log in and start using it with the CLI. In this guide, we’ll walk through the process of logging into ArgoCD using the CLI and then accessing the admin dashboard locally.

Prerequisites

Before you begin, make sure you have:

  • A running Kubernetes cluster (kind, minikube, or any managed service).
  • kubectl installed and configured to talk to your cluster.
  • ArgoCD installed in your cluster.
  • The argocd CLI installed (download instructions).

Install ArgoCD on your cluster

kubectl create namespace argocd

kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

kubectl get pods -n argocd

Port-forward the ArgoCD API server

By default, ArgoCD is installed in the argocd namespace. To connect to the dashboard locally, we’ll port-forward the API server service to your machine:

kubectl port-forward svc/argocd-server -n argocd 8080:443

This forwards port 8080 on your local machine to the ArgoCD server running in your cluster.

Now you can reach the ArgoCD API (and UI) at:

https://localhost:8080

Retrieve the Admin Password

When ArgoCD is first installed, an admin password is generated and stored in a Kubernetes secret. Run the following command to retrieve it:

kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo

Make note of this password — you’ll need it for both the CLI and the UI.

Login with the ArgoCD CLI

Now that we have the API server available and the password in hand, we can log in with the CLI:

argocd login localhost:8080 --username admin --password <PASTE_PASSWORD_HERE> --insecure
  • --username: Defaults to admin for first-time login.
  • --password: Use the password you retrieved from the Kubernetes secret.
  • --insecure: Since we’re using a self-signed cert with localhost, this flag avoids TLS verification issues.

After running this command, you should see a confirmation that you’re successfully logged in.

Access the Admin Dashboard

Now that the port-forward is still active (leave that terminal running), you can open your browser and go to:

https://localhost:8080

Log in with:

  • Username: admin
  • Password: the secret you retrieved earlier.

You should now see the full ArgoCD dashboard, where you can manage applications, projects, and repositories.

(Optional) Change the Admin Password

For security, it’s a good idea to change the default password after your first login:

argocd account update-password

You’ll be prompted to enter the old password, followed by the new one.

Alternate (quick and dirty)

Login to ArgoCD

kubectl config set-context --current --namespace=argocd
argocd login --core

Start a local UI proxy

argocd admin dashboard

Argo CD UI is available at http://localhost:8080

Wrapping Up

With these steps, you’ve:

  1. Port-forwarded the ArgoCD API server.
  2. Retrieved the initial admin password.
  3. Logged in using the ArgoCD CLI.
  4. Access the admin dashboard in your browser.

From here, you can start creating applications, syncing them with Git, and exploring the power of GitOps with ArgoCD.