Skip to content

Install ArgoCD for delivery to a WDS#

This document tells you how to install ArgoCD in the KubeFlex hosting cluster and configure ArgoCD to deliver applications to a WDS. The commands shown here assume that you access the KubeFlex hosting cluster via a kubeconfig context named "kind-kubeflex" and that you access the WDS via a kubeconfig context named "wds1"; adapt as appropriate to your particular circumstances.

Install ArgoCD on kind-kubeflex:

kubectl --context kind-kubeflex create namespace argocd
kubectl --context kind-kubeflex apply -n argocd -f

Install CLI:

on MacOS:

brew install argocd

on Linux:

curl -sSL -o argocd-linux-amd64
sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd
rm argocd-linux-amd64

Check the ArgoCD releases page for the obtaining the latest stable release for other architectures and operating systems.

Configure Argo to work with the ingress installed in the hosting cluster:

kubectl --context kind-kubeflex apply -f - <<EOF
kind: Ingress
  name: argocd-server-ingress
  namespace: argocd
  annotations: "true" "true"
  ingressClassName: nginx
  - host:
      - path: /
        pathType: Prefix
            name: argocd-server
              name: https

Open a browser to ArgoCD console:


Note: if you are working on a VM via SSH, just take the IP of the VM (VM_IP) and add the line <VM_IP> to your '/etc/hosts' file, replacing with the actual IP of your desktop.

Get the password for Argo with:

kubectl config use-context kind-kubeflex
argocd admin initial-password -n argocd

Login into the ArgoCD console with admin and the password just retrieved. Type the following on a shell terminal in your desktop (or just enter the address on your browser):


Also, login with the argocd CLI with the same credentials.

argocd login --insecure

Add the wds1 space as cluster to ArgoCD:

kubectl config view --minify --context=${CONTEXT} --flatten > /tmp/${CONTEXT}.kubeconfig
kubectl config --kubeconfig=/tmp/${CONTEXT}.kubeconfig set-cluster ${CONTEXT}-cluster --server=https://${CONTEXT}.${CONTEXT}-system 2>/dev/null
kubectl config use-context kind-kubeflex
ARGO_SERVER_POD=$(kubectl get pods -n argocd -l -o 'jsonpath={.items[0]}')
kubectl cp /tmp/${CONTEXT}.kubeconfig -n argocd ${ARGO_SERVER_POD}:/tmp
PASSWORD=$(argocd admin initial-password -n argocd | cut -d " " -f 1)
kubectl exec -it -n argocd $ARGO_SERVER_POD -- argocd login argocd-server.argocd --username admin --password $PASSWORD --insecure
kubectl exec -it -n argocd $ARGO_SERVER_POD -- argocd cluster add ${CONTEXT} --kubeconfig /tmp/${CONTEXT}.kubeconfig -y

Configure Argo to label resources with the "" label:

kubectl --context kind-kubeflex patch cm -n argocd argocd-cm -p '{"data": {"application.instanceLabelKey": ""}}'