What is ArgoCD?

ArgoCD is a declarative, GitOps-based continuous delivery tool for Kubernetes. It automates application deployment by continuously syncing the desired state defined in a Git repository to your Kubernetes cluster — your Git repository becomes the single source of truth.

Prerequisites

  • A running Kubernetes cluster (or kind for local testing)
  • kubectl configured to access your cluster
  • A Git repository containing Kubernetes manifests

Installing ArgoCD

Create the ArgoCD namespace and apply the official installation manifest:

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

Wait for all pods to become ready:

kubectl wait --for=condition=Ready pod --all -n argocd --timeout=120s

Accessing the ArgoCD UI

By default the ArgoCD server is not exposed externally. Use port-forwarding for local access:

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

Open https://localhost:8080 in your browser and retrieve the initial admin password:

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

Log in with username admin and the password above.

Installing the ArgoCD 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/

Authenticate the CLI:

argocd login localhost:8080 --username admin --password <your-password> --insecure

Deploying Your First Application

Create an application pointing to the official ArgoCD example repository:

argocd app create guestbook \
  --repo https://github.com/argoproj/argocd-example-apps.git \
  --path guestbook \
  --dest-server https://kubernetes.default.svc \
  --dest-namespace default

Trigger the first sync:

argocd app sync guestbook

Check the status:

argocd app get guestbook

Enabling Automated Sync

By default ArgoCD does not automatically apply changes from Git. Enable auto-sync with self-healing so the cluster always reflects the repository state:

argocd app set guestbook --sync-policy automated --self-heal --auto-prune

With --auto-prune, resources removed from Git are also removed from the cluster.

Upgrading ArgoCD

Apply the install manifest of the target version:

kubectl apply -n argocd \
  -f https://raw.githubusercontent.com/argoproj/argo-cd/<new-version>/manifests/install.yaml

Check the releases page for the latest version. After an upgrade, re-apply any custom ConfigMaps (argocd-cm) to preserve your configuration.


If you want to support me, buy me a coffee.