ArgoCD is a declarative GitOps continuous delivery tool for Kubernetes. It watches Git repositories (and optionally Helm or Kustomize) and keeps your cluster state in sync with what’s defined in Git, so deployments are auditable and easy to roll back. This guide walks you through deploying and configuring ArgoCD: installing it with the official manifests, exposing the API server (LoadBalancer, port-forward, or Ingress), logging in and changing the admin password, registering clusters, deploying an app from Git, and setting up repository credentials and AppProjects.
In this guide you’ll:
- Install ArgoCD in the
argocdnamespace and optionally use the core-only install - Install the
argocdCLI and access the server (LoadBalancer, port-forward, or Ingress with TLS) - Retrieve the initial admin password, log in, and change the password
- Register external clusters (or use the in-cluster API) and deploy an application from a Git repo
- Configure repository credentials for private repos and create an AppProject to scope sources and destinations
Related: How to set up ArgoCD Slack notifications · Deploy to Kubernetes with ArgoCD, GitHub Actions, and Helm
Prerequisites
Before you start, ensure you have:
- kubectl installed and configured
- A kubeconfig pointing at the cluster where you want to run ArgoCD (default:
~/.kube/config) - Cluster access sufficient to create namespaces, deployments, and services (e.g. cluster-admin or equivalent)
Install ArgoCD
Create the argocd namespace and set it as the current context:
| |
Install ArgoCD using the official install manifest (includes UI, SSO, multi-cluster support):
| |
If you don’t need the UI, SSO, or multi-cluster features, you can install only the core components:
| |
Install the ArgoCD CLI
You need the argocd CLI to log in and manage applications from the terminal. Download the latest version from the ArgoCD releases page, or see the CLI installation docs for other methods.
On macOS, Linux, and WSL you can use Homebrew:
| |
Access the ArgoCD API server
By default, the ArgoCD API server is not exposed outside the cluster. Choose one of the following ways to access it.
Option 1: LoadBalancer
Patch the argocd-server service to use type LoadBalancer (works well on cloud providers that support it):
| |
Option 2: Port forwarding
For local access without exposing the service, use kubectl port-forward:
| |
Then open https://localhost:8080 in your browser (accept the TLS warning if needed).
Option 3: Ingress
To expose ArgoCD behind an Ingress (e.g. with Traefik or NGINX and cert-manager), the server must run with TLS disabled and let the Ingress terminate TLS. Set server.insecure: "true" in the argocd-cmd-params-cm ConfigMap.
Edit the configmap:
| |
Update it to look like this:
| |
Restart the argocd-server deployment so it picks up the config:
| |
Create an Ingress resource. Save the following as ingress.yaml (replace the host and ingress class with yours; ArgoCD server listens on port 80 when insecure):
| |
Apply it:
| |
Log in and change the admin password
The initial admin password is auto-generated and stored in the secret argocd-initial-admin-secret in the argocd namespace. Retrieve it with the CLI:
| |
Or decode the Kubernetes secret directly:
| |
Log in with username admin and that password. Replace <ARGOCD_SERVER> with your server address (e.g. localhost:8080 if using port-forward, or the LoadBalancer hostname, or your Ingress host):
| |
If the server is not directly reachable (e.g. you’re on another machine), use port-forward from your laptop or add --port-forward-namespace argocd to the login command, or set export ARGOCD_OPTS='--port-forward-namespace argocd' so the CLI port-forwards automatically.
Change the admin password (recommended before doing anything else):
| |
After changing the password, you can delete argocd-initial-admin-secret from the argocd namespace; ArgoCD will recreate it if you need to regenerate the admin password later.
Register a cluster (for external deployments)
Registering a cluster is only needed when you want ArgoCD to deploy to a different cluster than the one ArgoCD runs on. When deploying to the same cluster where ArgoCD is installed, use https://kubernetes.default.svc as the destination server in your Application; that cluster is already known to ArgoCD.
First list all clusters contexts in your current kubeconfig:
| |
By default, the cluster where Argo CD is deployed is already configured by Argo CD. You can also see the list of clusters by CLI:
| |
Choose a context name from the list and supply it to argocd cluster add CONTEXTNAME. For example, for docker-desktop context, run:
| |
That command creates a ServiceAccount (argocd-manager) in the target cluster’s kube-system namespace and binds it to a ClusterRole so ArgoCD can deploy and manage resources there.
Enable Helm for Kustomize (optional)
If you use Kustomize that references Helm charts, you must pass --enable-helm to the kustomize build. To do that globally in ArgoCD, set kustomize.buildOptions in the argocd-cm ConfigMap:
Edit configmap:
| |
Then update it to look like this:
| |
Restart the ArgoCD components that read this config (repo-server and server):
| |
Deploy an application from Git
You can now register an application that points at a Git repo. ArgoCD will sync the manifests (or Helm/Kustomize output) from that repo into the cluster.
Set the current namespace to argocd and register your app:
| |
Then run the following CLI command to register your app:
| |
Let’s unpack what’s happening here:
- The
--repoflag specifies the URL of your Git repository. - The
--pathflag instructs Argo to search for Kubernetes manifests, Helm charts, and other deployable assets inside this path within your repo. . is used here because the example manifests are stored in the repo’s root. - The
--dest-serverflag specifies the URL of the Kubernetes cluster to deploy to. You can usekubernetes.default.svcwhen you’re deploying to the same cluster that Argo’s running in. --dest-namespacesets the Kubernetes namespace that your app will be deployed into. This should match themetadata.namespacefields set on your resources.
Your app will now be registered with Argo. You can retrieve its details with the argocd app list command:
| |
The app also shows up in the Argo UI:
The sync results display in your terminal. You should see the Namespace, Service, and Deployment objects all get synced into your cluster, as in the command output above. The messages for all three objects confirm they were created successfully.
Repeat the apps list command to check the app’s new status:
| |
Now the app is Synced and Healthy! It’s also green in the Argo UI:
As a final proof, use Kubectl to inspect the deployments in the app’s namespace. This should confirm that nginx is up and running three replicas:
| |
Once the application is created, you can now view its status:
| |
To manually sync the application (pull from Git and apply):
| |
ArgoCD will fetch the manifests from the repo and apply them to the cluster.
Repository credentials (private Git repos)
For private Git repositories, ArgoCD needs credentials. You add them as a Kubernetes Secret with the label argocd.argoproj.io/secret-type: repository. ArgoCD discovers these secrets automatically.
Use stringData so you don’t have to base64-encode values (Kubernetes will encode them). Replace the URL, username, and token with your repo and a fine-grained or classic GitHub token with repo scope (read is enough for ArgoCD):
| |
Then apply:
| |
In the ArgoCD UI, go to Settings → Repositories and confirm the repo appears and connects successfully.
Application projects (AppProject)
AppProjects group applications and let you restrict what can be deployed:
- Source repos — Which Git repositories are allowed
- Destinations — Which clusters and namespaces apps can deploy to
- Resource allow/deny — Which Kubernetes resource kinds are allowed (e.g. limit to certain CRDs or forbid NetworkPolicy)
- RBAC — Project roles tied to OIDC or JWT for team access
Every Application belongs to one project. If you don’t set one, the app uses the default project, which allows any repo and any destination. For tighter control, create a custom AppProject and set spec.project on your Applications.
Example: create a project that only allows a specific Git repo and the in-cluster API:
| |
Apply the project:
| |
When you create Applications (via CLI or YAML), set --project main-cluster-apps or spec.project: main-cluster-apps so they use this project.
Frequently Asked Questions (FAQ)
What is ArgoCD?
ArgoCD is a GitOps continuous delivery tool for Kubernetes. It watches Git repositories (and optionally Helm or Kustomize) and keeps cluster state in sync with what’s in Git. You get declarative deployments, audit history in Git, and easy rollback by reverting or changing the source path.
How do I get the ArgoCD admin password?
The initial password is in the secret argocd-initial-admin-secret in the argocd namespace. Run argocd admin initial-password -n argocd or kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo. Log in with username admin, then change the password with argocd account update-password.
What is the difference between full install and core install?
The full install (install.yaml) includes the UI, SSO, and multi-cluster features. The core install (core-install.yaml) is a smaller footprint with only the components needed for GitOps sync. Use core if you don’t need the web UI or SSO.
How do I deploy to the same cluster where ArgoCD runs?
Use https://kubernetes.default.svc as the destination server when creating the Application. The in-cluster API is already registered; you only need to run argocd cluster add for other clusters.
How do I add a private Git repo to ArgoCD?
Create a Secret in the argocd namespace with label argocd.argoproj.io/secret-type: repository and fields url, username, and password (or sshPrivateKey). Use a fine-grained or classic GitHub token with minimal scope. ArgoCD will pick up the secret and use it for that repo.
Conclusion
You’ve installed ArgoCD in Kubernetes, exposed the server (LoadBalancer, port-forward, or Ingress), logged in and changed the admin password, and deployed an application from Git. You also configured repository credentials for private repos and created an AppProject to scope sources and destinations. For Slack alerts on sync and health, see how to set up ArgoCD Slack notifications. For a full CI/CD pipeline that builds images, runs Helm template, and pushes manifests to a GitOps repo for ArgoCD, see deploy to Kubernetes with ArgoCD, GitHub Actions, and Helm.