QuickStart with ArgoCD
Get started with ArgoCD in OpenShift! This post covers the basics of GitOps, setting up ArgoCD, and deploying your first application with automated continuous delivery.

Introduction
ArgoCD is a declarative, GitOps-based continuous delivery tool for Kubernetes. It allows users to maintain the desired state of Kubernetes applications using Git repositories as the source of truth. This guide provides a quick start to deploying applications using ArgoCD.
Prerequisites
Before starting, ensure you have the following:
- A Kubernetes cluster (e.g., Minikube, Kind, or a cloud provider's Kubernetes service)
kubectl
installed and configuredhelm
installed (optional but recommended)- A Git repository with a Kubernetes manifest or Helm chart
Installing ArgoCD
1. Install ArgoCD in Kubernetes
To install ArgoCD in a Kubernetes cluster, run the following command:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
2. Verify Installation
Check if all ArgoCD pods are running:
kubectl get pods -n argocd
3. Access the ArgoCD UI
Expose the ArgoCD API server:
kubectl port-forward svc/argocd-server -n argocd 8080:443
Now, access the UI at https://localhost:8080
.
4. Login to ArgoCD CLI
Retrieve the initial admin password:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
Then login using:
argocd login localhost:8080 --username admin --password <password>
Deploying an Application with ArgoCD
1. Register a Git Repository
In the ArgoCD UI or via CLI, register a Git repository containing Kubernetes manifests or Helm charts.
Example using CLI:
argocd repo add https://github.com/your-repo.git --username your-username --password your-password
2. Create an Application
You can create an ArgoCD application by running:
argocd app create my-app \
--repo https://github.com/your-repo.git \
--path my-app-directory \
--dest-server https://kubernetes.default.svc \
--dest-namespace default
3. Sync the Application
After creating the application, sync it with:
argocd app sync my-app
4. Monitor Application Status
Check the status of your application:
argocd app get my-app
Comments