k8s Argocd

Practice of argocd in Bandwagon k8s cluster

Posted by Wilson on November 28, 2021

Ingress Introduction

ArgoCD is a declarative GitOps tool built to deploy applications to Kubernetes. While the continuous delivery (CD) space is seen by some as crowded these days, ArgoCD does bring some interesting capabilities to the table.

image

When a commit happens (usually one that updates the versions of the image artifacts), Argo CD starts a “synchronization” process that is responsible for bringing the cluster configuration in the same state as described in Git.

image

Step 1: Install argocd k8s resources

kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
 	kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
  • after installation, run below to check status , we get argocd server nodeport is ‘31234’

    k get all –namespace argocd

image

Step 2: get argocd admin password

kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d

#if password not woring, try to reset it, it is "password":
kubectl -n argocd patch secret argocd-secret \
  -p '{"stringData": {
    "admin.password": "$2a$10$rRyBsGSHK6.uc8fntPwVIuLVHgsAhAX7TcdrqW/RADU0uh7CaChLa",
    "admin.passwordMtime": "'$(date +%FT%T%Z)'"
  }}'

image

Step 3: open argocd ui

https://your linux box host:31234