This document outlines the steps to set up and configure ArgoCD on a Kubernetes cluster.
- Kubernetes cluster (v1.16+)
kubectl
CLI tool- ArgoCD CLI tool
For this demo we required the kubernetes cluster. If you want to understand how to create the eks we have the video for that. Below is the link.
https://youtu.be/33PZszzTWAQ?si=it4Cq1vgXLcO9IW7
- Create Namespace for ArgoCD:
kubectl create namespace argocd
- Install ArgoCD on Kubernetes Cluster:
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
- Patch Service Type to LoadBalancer:
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
- Retrieve Admin Password:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
These commands will install ArgoCD into the specified namespace, set up the service as a LoadBalancer, and retrieve the admin password for you to access the ArgoCD UI.
-
Login to ArgoCD:
argocd login <argocd-access-url>
Retrieve the initial admin password:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
-
Change Admin Password:
argocd account update-password
-
Add a Git Repository:
argocd repo add https://github.com/<your-repo>/<your-app>.git
-
Create an Application:
argocd app create <app-name> \ --repo https://github.com/<your-repo>/<your-app>.git \ --path <app-path> \ --dest-server https://kubernetes.default.svc \ --dest-namespace <namespace>
-
Sync an Application:
argocd app sync <app-name>
- List applications:
argocd app list
- Get application details:
argocd app get <app-name>
- Delete an application:
argocd app delete <app-name>
Access the ArgoCD Web UI at https://localhost:8080
.
For more detailed information, visit the ArgoCD documentation.