argoCD CLI - jupark33/Spring GitHub Wiki

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

kubectl get po -n argocd

// ์™ธ๋ถ€ ๋…ธ์ถœ NodePort
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "NodePort"}}' 	
// ํŒŒ๋“œ ๋‚ด๋ถ€ ์ง„์ž… 
kubectl exec -it argocd-server-56f7986dff-znzwc -n argocd -- bash
// argocd ๋กœ๊ทธ์ธ
argocd login ip:port
  • argoCD install
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.9.9/manifests/install.yaml
  • argoCD Uninstall
kubectl delete -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
  • admin pwd
kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath="{.data.password}" ;echo
  • argocd pod ์ƒํƒœ
kubectl get pods -n argocd
  • argoCD ์›น ์ ‘์† ์ฃผ์†Œ
kubectl describe svc argocd-server -n argocd
  • argoCD ์„œ๋ฒ„ ์ปจํ…Œ์ด๋„ˆ ๋‚ด๋ถ€ ์ง„์ž…, argocd ๋กœ๊ทธ์ธ
kubectl exec -it argocd-server-difjkleknofw-kjfdd -n argocd -- bash
argocd login x.x.x.x:8080
  • create namespace
kubectl create namespace echo
  • sample app ๋ฐฐํฌ, (argoCD ์„œ๋ฒ„ ์ปจํ…Œ์ด๋„ˆ ๋‚ด๋ถ€ ์ง„์ž…, argocd ๋กœ๊ทธ์ธ ํ›„)
argocd app create sample-app --repo https://github.com/argoproj/argocd-example-apps.git --path guestbook --dest-server https://kubernetes.default.svc --dest-namespace default
argocd app sync sample-app
  • sample app ์ ‘์†
kubectl get service -n default
kubectl port-forward svc/guestbook-ui 9090:80

sample app ์ ‘์† ํ™”๋ฉด

  • create application
argocd app create echo --repo http://host.docker.internal:9080/gitops/echo.git --path echo --dest-server https://kubernetes.default.svc --dest-namespace echo