Introduction
In modern DevOps practices, GitOps is the methodology of managing infrastructure and application deployments via Git repositories. ArgoCD is a Continuous Delivery (CD) tool for Kubernetes that implements GitOps principles.
In this guide you will:
- Install ArgoCD on a Kubernetes cluster.
- Synchronize manifests from a Git repository.
- Deploy your first application using GitOps workflow.
Prerequisites
- A running Kubernetes cluster (Minikube, Kind, or cloud provider).
- kubectl installed and connected.
- Example repository on GitHub or GitLab.
- (Optional) Helm installed.
Step 1 – Install ArgoCD
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl get pods -n argocd
Step 2 – Access ArgoCD UI and CLI
kubectl port-forward svc/argocd-server -n argocd 8080:443
👉 https://localhost:8080
Default username: admin
Password:
kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath="{.data.password}" | base64 -d
CLI install:
brew install argocd # Mac
sudo apt-get install argocd-cli # Linux
Step 3 – Deploy First Application
argocd login localhost:8080
argocd app create guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path guestbook --dest-server https://kubernetes.default.svc --dest-namespace default
argocd app sync guestbook
Step 4 – GitOps Workflow
- Push: Commit and push manifest changes.
- ArgoCD: Polls or is triggered via webhook.
- Cluster: New versions are automatically applied.
Conclusion
You have successfully set up ArgoCD and deployed your first GitOps-based app.