Disclosure: Some links in this article are affiliate links. We may earn a small commission at no extra cost to you.
How to Install and Configure ArgoCD on Kubernetes (2026 Step-by-Step Guide)
ArgoCD is the most popular GitOps tool for Kubernetes, and for good reason — it gives you declarative, version-controlled deployments with a visual dashboard. This guide walks you through installation, configuration, and deploying your first application.
Prerequisites
- A Kubernetes cluster (1.24+). DigitalOcean DOKS is the easiest option for testing — $200 free credit.
kubectlconfigured and connected to your cluster- A Git repository with Kubernetes manifests
Step 1: Install ArgoCD
# Create namespace
kubectl create namespace argocd
# Install ArgoCD
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
# Verify pods are running
kubectl get pods -n argocd
Wait until all pods show Running status (2-3 minutes).
Step 2: Access the Dashboard
# Port-forward the ArgoCD server
kubectl port-forward svc/argocd-server -n argocd 8080:443
# Get the initial admin password
kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath="{.data.password}" | base64 -d
Open https://localhost:8080 in your browser. Login with username admin and the password from above.
Step 3: Install the CLI
# macOS
brew install argocd
# Linux
curl -sSL -o argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
chmod +x argocd
sudo mv argocd /usr/local/bin/
# Login
argocd login localhost:8080 --username admin --password <your-password> --insecure
Step 4: Connect a Git Repository
# Add a private repo (HTTPS)
argocd repo add https://github.com/yourorg/k8s-manifests.git \
--username <git-username> \
--password <git-token>
# Or add via SSH
argocd repo add git@github.com:yourorg/k8s-manifests.git \
--ssh-private-key-path ~/.ssh/id_rsa
Step 5: Deploy Your First Application
Option A: CLI
argocd app create my-app \
--repo https://github.com/yourorg/k8s-manifests.git \
--path kubernetes/ \
--dest-server https://kubernetes.default.svc \
--dest-namespace default \
--sync-policy automated \
--auto-prune \
--self-heal
Option B: Declarative YAML
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-app
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/yourorg/k8s-manifests.git
targetRevision: HEAD
path: kubernetes/
destination:
server: https://kubernetes.default.svc
namespace: default
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
Apply it:
kubectl apply -f application.yaml
Step 6: Configure Sync Policies
Auto-Sync
ArgoCD detects drift and automatically syncs:
syncPolicy:
automated:
prune: true # Delete resources removed from Git
selfHeal: true # Revert manual changes
Sync Windows
Restrict when syncs happen (e.g., no deploys on weekends):
spec:
syncWindows:
- kind: allow
schedule: "0 8-18 * * 1-5" # Mon-Fri, 8am-6pm
duration: 10h
Step 7: Set Up Notifications
ArgoCD can notify you on sync success/failure via Slack, email, or webhooks:
# Install notifications controller
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj-labs/argocd-notifications/stable/manifests/install.yaml
Production Hardening Checklist
- [ ] Change the default admin password
- [ ] Enable SSO (OIDC/SAML)
- [ ] Set up RBAC projects to isolate teams
- [ ] Enable TLS with a real certificate
- [ ] Configure resource tracking (label or annotation)
- [ ] Set up monitoring with Prometheus metrics
- [ ] Back up the ArgoCD configuration
Recommended Resources
- Kubernetes in Action — deep Kubernetes understanding
- The DevOps Handbook — GitOps principles
- GitOps and Kubernetes — dedicated GitOps guide
This is Part 1 of our ArgoCD Deep-Dive Series. Next: ArgoCD with Helm Charts
Need a cluster? Get $200 free credit on DigitalOcean — managed Kubernetes with free control plane.
See also: Build a GitOps Pipeline in Argo | Mastering Harbor and ArgoCD Integration