DEV Community

Cover image for Setting Up ArgoCD on Kubernetes CLuster
Durrell  Gemuh
Durrell Gemuh

Posted on

Setting Up ArgoCD on Kubernetes CLuster

Prerequisites

Before starting, make sure you have these installed:

  • Docker (running)
  • minikube ≥ v1.30
  • kubectl ≥ v1.27
  • Helm ≥ v3.12 (optional but recommended)
  • argocd CLI

Step 1 — Start Minikube

minikube start --driver=docker
Enter fullscreen mode Exit fullscreen mode

Verify it's running:

kubectl get nodes
Enter fullscreen mode Exit fullscreen mode

Expected output:

NAME       STATUS   ROLES           AGE   VERSION
minikube   Ready    control-plane   30s   v1.30.x
Enter fullscreen mode Exit fullscreen mode

Step 2 — Create the ArgoCD Namespace

kubectl create namespace argocd
Enter fullscreen mode Exit fullscreen mode

Step 3 — Install ArgoCD

Apply the official ArgoCD install manifest:

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

Verify all pods are up:

kubectl get pods -n argocd
Enter fullscreen mode Exit fullscreen mode

Expected output:

NAME                                                READY   STATUS    RESTARTS
argocd-application-controller-0                     1/1     Running   0
argocd-applicationset-controller-xxxxxxxxx-xxxxx    1/1     Running   0
argocd-dex-server-xxxxxxxxx-xxxxx                   1/1     Running   0
argocd-notifications-controller-xxxxxxxxx-xxxxx     1/1     Running   0
argocd-redis-xxxxxxxxx-xxxxx                        1/1     Running   0
argocd-repo-server-xxxxxxxxx-xxxxx                  1/1     Running   0
argocd-server-xxxxxxxxx-xxxxx                       1/1     Running   0
Enter fullscreen mode Exit fullscreen mode

Step 4 — Expose the ArgoCD UI

For local dev, port-forward the ArgoCD API server:

kubectl port-forward svc/argocd-server -n argocd 8080:443
Enter fullscreen mode Exit fullscreen mode

Keep this terminal open. The UI is now available at https://localhost:8080

Step 5 — Install the ArgoCD CLI

macOS (Homebrew):

brew install argocd
Enter fullscreen mode Exit fullscreen mode

Linux:

curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd
rm argocd-linux-amd64
Enter fullscreen mode Exit fullscreen mode

Windows (Chocolatey):

choco install argocd-cli
Enter fullscreen mode Exit fullscreen mode

Step 6 — Retrieve the Initial Admin Password

kubectl get secret argocd-initial-admin-secret \
  -n argocd \
  -o jsonpath="{.data.password}" | base64 -d && echo
Enter fullscreen mode Exit fullscreen mode

Copy the output — this is your initial password, user name "admin"

Step 7 — Log in via CLI

argocd login localhost:8080 \
  --username admin \
  --password <YOUR_PASSWORD_HERE> \
  --insecure
Enter fullscreen mode Exit fullscreen mode

--insecure skips TLS verification for local dev — do NOT use in production.

Step 8 — Change the Admin Password

argocd account update-password \
  --current-password <YOUR_PASSWORD_HERE> \
  --new-password <NEW_STRONG_PASSWORD>
Enter fullscreen mode Exit fullscreen mode

Step 9 — Register Your Cluster (optional for Minikube)

Since we're deploying to the same cluster ArgoCD runs on, register it:

argocd cluster add minikube --in-cluster
Enter fullscreen mode Exit fullscreen mode

List registered clusters:

argocd cluster list
Enter fullscreen mode Exit fullscreen mode

Step 10 — Deploy Your First Application

This example deploys the official ArgoCD guestbook sample app:

argocd app create guestbook \
  --repo https://github.com/argoproj/argocd-example-apps.git \
  --path guestbook \
  --dest-server https://kubernetes.default.svc \
  --dest-namespace default \
  --sync-policy automated \
  --auto-prune \
  --self-heal
Enter fullscreen mode Exit fullscreen mode

What each flag does:

Flag Purpose
--repo Git repo containing your manifests
--path Folder inside the repo
--dest-server Target cluster (in-cluster URL)
--dest-namespace Kubernetes namespace to deploy into
--sync-policy automated Auto-sync on every Git push
--auto-prune Deletes resources removed from Git
--self-heal Reverts manual kubectl changes

Step 11 — Trigger & Check Sync

Manually sync:

argocd app sync guestbook
Enter fullscreen mode Exit fullscreen mode

Check app status:

argocd app get guestbook
Enter fullscreen mode Exit fullscreen mode

Watch live sync status:

argocd app wait guestbook --sync
Enter fullscreen mode Exit fullscreen mode

List all apps:

argocd app list
Enter fullscreen mode Exit fullscreen mode

Step 12 — Access the ArgoCD Web UI

Open https://localhost:8080 in your browser (accept the self-signed cert warning), log in as admin, and you'll see the guestbook app fully synced.

Bonus: Use a NodePort Instead of Port-Forward

For a more persistent local setup, patch the service to NodePort:

kubectl patch svc argocd-server \
  -n argocd \
  -p '{"spec": {"type": "NodePort"}}'
Enter fullscreen mode Exit fullscreen mode

Then get the Minikube URL:

minikube service argocd-server -n argocd --url
Enter fullscreen mode Exit fullscreen mode

Bonus: Enable Minikube Addons

# Enable ingress
minikube addons enable ingress

# Enable dashboard (useful for debugging)
minikube addons enable dashboard
minikube dashboard
Enter fullscreen mode Exit fullscreen mode

Cleanup

To tear everything down:

# Delete the ArgoCD app
argocd app delete guestbook --cascade

# Delete ArgoCD namespace
kubectl delete namespace argocd

# Stop Minikube
minikube stop

# (Optional) Fully delete the cluster
minikube delete
Enter fullscreen mode Exit fullscreen mode

Quick Reference Cheat Sheet

# Start environment
minikube start --cpus=4 --memory=8192 --driver=docker
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl port-forward svc/argocd-server -n argocd 8080:443

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

# Login
argocd login localhost:8080 --username admin --password <PASS> --insecure

# Deploy an app
argocd app create <APP> --repo <REPO_URL> --path <PATH> \
  --dest-server https://kubernetes.default.svc --dest-namespace default \
  --sync-policy automated --auto-prune --self-heal

# Sync + status
argocd app sync <APP>
argocd app get <APP>
argocd app list
Enter fullscreen mode Exit fullscreen mode

Top comments (0)