Skip to main content
ArgoCD is a declarative, GitOps continuous delivery tool for Kubernetes. It monitors your Git repository and automatically syncs the desired state to your cluster.

Prerequisites

  • Running Kubernetes cluster (EKS, GKE, AKS, or self-managed)
  • Helm installed
  • kubectl configured
  • Git repository with Kubernetes manifests

Installing ArgoCD

1

Add Argo Helm Repository

helm repo add argo https://argoproj.github.io/argo-helm
helm repo update
2

Create ArgoCD Namespace

kubectl create ns argocd
3

Create Values File

Create a values file to expose ArgoCD via LoadBalancer:
argo-cd-values.yaml
server:
  service:
    type: LoadBalancer
4

Install ArgoCD

helm -n argocd install argocd-demo argo/argo-cd -f argo-cd-values.yaml
5

Retrieve Admin Password

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

Accessing ArgoCD Dashboard

Access the ArgoCD UI using the LoadBalancer URL with:
  • Username: admin
  • Password: Retrieved from the previous step

Creating an Application

Option 1: Using the UI

1

Navigate to New App

Click on New App in the ArgoCD dashboard
2

Configure Application Settings

Fill in the application details:
3

Create and Sync

Click Create and then Sync to deploy the application

Option 2: Using YAML Manifest

application.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: testapp
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://github.com/networknuts/argocd
    targetRevision: HEAD
    path: releaseone
  destination:
    server: https://kubernetes.default.svc
    namespace: default
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
Apply the manifest:
kubectl apply -f application.yaml

GitOps Workflow

1

Push Changes to Git

Make changes to your Kubernetes manifests in the Git repository:
git add .
git commit -m "Update deployment replicas"
git push origin main
2

ArgoCD Detects Changes

ArgoCD will detect the changes in your Git repository
3

Automatic Sync (if enabled)

If automatic sync is enabled, ArgoCD will apply changes immediately. Otherwise, click Sync in the UI.
4

Verify Deployment

Access your application using the LoadBalancer service URL

Getting Cluster URL

# If ArgoCD is running on the same cluster
https://kubernetes.default.svc

Sync Policies

Requires manual approval to sync changes from Git to the cluster. Provides more control over deployments.
syncPolicy:
  syncOptions:
  - CreateNamespace=true
Automatically syncs changes from Git to the cluster when detected.
syncPolicy:
  automated:
    prune: true
    selfHeal: true
  • prune: Delete resources that are no longer in Git
  • selfHeal: Revert manual changes made to the cluster

Alternative Installation (Custom Template)

For advanced customization:
# Generate template with custom settings
helm template argocd argo/argo-cd --version 1.2.3 --set crds.install=false > myvalues.yaml

# Install with custom template
helm -n argocd install argocd argo/argo-cd -f myvalues.yaml

# Verify pods
kubectl -n argocd get pods
Never commit the ArgoCD admin password to Git. Use Kubernetes secrets or external secret management solutions.

Best Practices

  • Use separate Git repositories for application code and Kubernetes manifests
  • Implement branch-based deployments (main → production, develop → staging)
  • Enable automated sync only after thorough testing
  • Use ArgoCD Projects to organize applications and enforce policies
  • Monitor sync status and set up alerts for failed deployments
ArgoCD supports multiple source types including Helm charts, Kustomize, Jsonnet, and plain YAML manifests.

Build docs developers (and LLMs) love