ArgoCD Install Configuration & Issues - q-uest/notes-doc-k8s-docker-jenkins-all-else GitHub Wiki

ArgoCD Installation_Configuration.pdf

Argocd on GKE (with LoadBalancer)

A_MUST_READ: https://devopscube.com/setup-kubernetes-cluster-google-cloud/

ArgoCD Install

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

Create ArgoCD LoadBalancer Service:

apiVersion: v1
kind: Service
metadata:
  name: argo-svc
  namespace: argocd
spec:
  selector:
    app.kubernetes.io/name: argocd-server
  type: LoadBalancer
  ports:
    - name: http
      port: 80
      targetPort: 8080
    - name: https
      port: 443
      targetPort: 8083

Example Firewall Rule:

gcloud compute firewall-rules create gke-webapps \
    --network=gke-network \
    --allow=tcp:32000 \
    --description="Allow incoming traffic on TCP port 32000" \
    --direction=INGRESS \
    --source-ranges="0.0.0.0/0" \
    --target-tags="gke-webapps"

Error:

curl https://35.239.199.23:443 curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number

Solution for the error:

https://deploy.seldon.io/en/v1.2/contents/getting-started/production-installation/gitops.html

As a general choice, we recommend to handle SSL termination at the ingress / load balancer level. This simplifies the components setup within the cluster.

Following this approach, we will need to disable the SSL termination in ArgoCD. Otherwise, ArgoCD will expect to receive SSL traffic by default. To do this, we can ask ArgoCD to run in insecure mode by running the command below:

kubectl patch deploy argocd-server \
    -n argocd \
    -p '[{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--insecure"}]' \
    --type json

Getting Argocd Admin Password

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

OR

kubectl get secret argocd-initial-admin-secret -n argocd -o yaml|grep password|cut -d ":" -f2|cut -d " " -f2|base64 -d

Argocd Application Configuration

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: myapp-argo-application
  namespace: argocd
spec:
  project: default

  source:
    repoURL: https://github.com/projectdec2021/appointme-admin-api.git
    targetRevision: helm-deployment
    path: helm/argocd
  destination: 
    server: https://kubernetes.default.svc
    namespace: appointme-admin

  syncPolicy:
    syncOptions:
    - CreateNamespace=true

    automated:
      selfHeal: true
      prune: true