Prerequisites:
Docker
Kubectl
Setup:
Create a namespace for ArgoCD:
kubectl create namespace argocd
Apply the ArgoCD installation manifest:
kubectl apply -n argocd -f
https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
Check the status of the pods:
kubectl get pods -n argocd
Port forward the ArgoCD server:
kubectl port-forward svc/argocd-server -n argocd 8080:443
Retrieve the initial admin password:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
Install the ArgoCD CLI by following the instructions at: argo-cd.readthedocs.io/en/stable/cli_instal..
Patch the ArgoCD server service to use a LoadBalancer type:
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
Get the external IP of the ArgoCD server:
kubectl get svc argocd-server -n argocd
Log in to ArgoCD CLI using the localhost:
argocd login
localhost
Update the admin password:
argocd account update-password
Add the Docker Desktop cluster:
argocd cluster add docker-desktop
List the applications:
argocd app list
Set the current context namespace to argocd:
kubectl config set-context --current --namespace=argocd
Add an application from the CLI:
argocd app create guestbook --repo
https://github.com/argoproj/argocd-example-apps.git
--path guestbook --dest-server
https://kubernetes.default.svc
--dest-namespace default
List the applications again:
argocd app list
References:
ArgoCD on Minikube: argoproj.github.io/argo-cd/getting_started/..
ArgoCD on Docker Desktop: argoproj.github.io/argo-cd/getting_started/..
Example command to create an app using ArgoCD CLI:
argocd app create guestbook --repo
https://github.com/argoproj/argocd-example-apps.git
--path guestbook --dest-server
https://kubernetes.default.svc
--dest-namespace default