ArgoCD is a declarative, GitOps continuous delivery tool for Kubernetes. It helps manage application deployments using Git repositories as the source of truth. In this guide, we'll walk through installing ArgoCD on a Kubernetes cluster using Helm.
Prerequisites
Before we begin, ensure you have the following installed:
A running Kubernetes cluster (v1.20+ recommended)
kubectl installed and configured
Helm (v3 recommended)
Ingress Controller (optional, for exposing the ArgoCD UI)
Step 1: Add the ArgoCD Helm Repository
First, add the ArgoCD Helm repository and update your Helm repositories:
helm repo add argo https://argoproj.github.io/argo-helm
helm repo update
Step 2: Install ArgoCD Using Helm
Next, install ArgoCD into a dedicated namespace (argocd
):
kubectl create namespace argocd
helm install argocd argo/argo-cd -n argocd --wait
This command installs ArgoCD with default settings. You can customize values by creating a values.yaml
file.
Step 3: Verify Installation
Check if all ArgoCD pods are running:
kubectl get pods -n argocd
You should see pods like:
NAME READY STATUS RESTARTS AGE
argocd-application-controller-0 1/1 Running 0 2m
argocd-dex-server-846b9b57cc-8tdrp 1/1 Running 0 2m
argocd-redis-75f6f9f6b7-7tfnx 1/1 Running 0 2m
argocd-repo-server-5cbbcdd8f6-pt6tz 1/1 Running 0 2m
argocd-server-7bb8f68db4-khjzp 1/1 Running 0 2m
Step 4: Access ArgoCD Dashboard
By default, ArgoCD is deployed with a service of type ClusterIP
. You can expose it using kubectl port-forward
:
kubectl port-forward svc/argocd-server -n argocd 8080:443
Now, you can access the ArgoCD UI at https://localhost:8080
.
Step 5: Retrieve ArgoCD Admin Password
The initial admin password is stored as a secret. Retrieve it using:
kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath="{.data.password}" | base64 --decode
Use admin
as the username and the retrieved password to log in.
Step 6: Configure ArgoCD CLI (Optional)
To interact with ArgoCD via CLI, install the ArgoCD CLI:
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/
Then, login to ArgoCD:
argocd login localhost:8080 --username admin --password <your-password>
Step 7: Configure Ingress (Optional)
If you prefer to expose ArgoCD via an Ingress controller, update your Helm installation with:
helm upgrade argocd argo/argo-cd -n argocd \
--set server.ingress.enabled=true \
--set server.ingress.hosts[0]=argocd.example.com
Ensure you configure your DNS to point argocd.example.com
to your Ingress controller.