ArgoCD on Local K8s Cluster

This is a simple guide to setup ArgoCD on a local K8s cluster.

Prerequisites

Setup

  1. kubectl create namespace argocd

  2. kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

  3. Check the status of the pods

kubectl get pods -n argocd

  1. kubectl port-forward svc/argocd-server -n argocd 8080:443
  2. kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
  3. https://argo-cd.readthedocs.io/en/stable/cli_installation/ - Install ArgoCD CLI
  4. kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
  5. kubectl get svc argocd-server -n argocd
  6. argocd login localhost - Login to ArgoCD CLI
  7. argocd account update-password
  8. argocd cluster add docker-desktop
  9. argocd app list
  10. kubectl config set-context --current --namespace=argocd
  11. Add app from 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
  12. argocd app list

References

argocd app create guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path guestbook --dest-server https://kubernetes.default.svc --dest-namespace default