Although the Dispatch CLI has some Dispatch gitops subcommands achieved by wrapping some of the functions of the argocd CLI, advanced users may want to configure the argocd CLI. In this article, we describe how to do so.
Firstly, the binary must be downloaded and made executable. Please make sure to specify the version ($VERSION):
curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/download/$VERSION/argocd-linux-amd64 chmod +x /usr/local/bin/argocd
Accessing argocd-server API server:
To access the argocd-server, the operator can use port-forwarding to reach the dispatch-argocd-server service from the localhost:
kubectl get svc dispatch-argocd-server -n dispatch NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE dispatch-argocd-server ClusterIP 10.0.37.173 80/TCP,443/TCP 4d1h kubectl port-forward svc/dispatch-argocd-server -n dispatch 8080:443 Forwarding from 127.0.0.1:8080 -> 8080After setting the port-forward, the argocd api server can be accessed at the localhost:8080:
argocd login localhost:8080Another option to expose the argocd api server is to modify the service type for the dispatch-argocd-server from ClusterIp to LoadBalancer with the following command:
kubectl patch svc dispatch-argocd-server -n dispatch -p '{"spec": {"type": "LoadBalancer"}}' kubectl get svc dispatch-argocd-server -n dispatch NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE dispatch-argocd-server LoadBalancer 10.0.24.206 192.168.2.46 80:32766/TCP,443:32161/TCP 27mThen, the argocd api server can be reached at the External-IP of the service:
argocd login 192.168.2.46 WARNING: server is not configured with TLS. Proceed (y/n)? y Username: admin Password: 'admin' logged in successfully Context '192.168.2.46' updated
Setting argocd admin password:
In argocd 1.8 and earlier releases, the initial password is autogenerated to be the pod name of the Argo CD API server. As the version of argocd shipped with Dispatch 1.3 is v1.6.2, the initial password can be retrieved with the command:
kubectl get pods -n dispatch -l app.kubernetes.io/name=argocd-server -o name | cut -d'/' -f 2
To change the initial password, the following command can be executed:
argocd account update-password