How to configure ArgoCD UI and CLI

How to configure ArgoCD UI and CLI

What is ArgoCD?

Argo CD is an open-source GitOps continuous delivery tool. It monitors your cluster and your declaratively-defined infrastructure stored in a Git repository and resolves differences between the two effectively automating application deployment.

Requirements

Installation of Argocd on Kubernetes Cluster:

  1. Run the below command to create namespace and Install Argocd

    >> kubectl create namespace argocd

    >> kubectl apply -n argocd -f raw.githubusercontent.com/argoproj/argo-cd/..

  2. Run >> kubectl -n argocd get all to view the pods, services, deployments etc for Argocd namespace.

  3. We more interested in argocd server, so that we can view ArgoCD UI.

    You can view the services running using below command.

    >> kubectl get svc -n argocd

  4. You can see the above argocd-server service is of Type Cluster-IP. This is for internal communication within the pods. But to access it via the internet or externally, you will need TYPE as Loadbalancer or NodePort.

    Now let's change the Cluster-IP to Loadbalancer so that it can be accessible from the outside world.

    Run the below commd to edit argocd-server service.

    >> kubectl -n argocd edit svc argocd-server

  5. Run again the below command

    >> kubectl get svc -n argocd

    You can see, it is now LoadBalancer and EXTERNAL-IP has been assigned, also running on Port 30622.

  6. To view the UI, Paste the External Ip of your cluster in your browser.

  7. For the username and password.

    By default, the username will be admin and to get the password which is stored in secret argocd-initial-admin-secret.

    Run the below command:

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

  8. Now login to the page using that password.

  9. It is better to update your password. Go to user info--> update password

Installing ArgoCD CLI

  1. Navigate to the link ArgoCD-CLI

  2. As I have a Windows machine, I am downloading windows**.exe

  3. Rename the argo-windows-amd64.exe to argo.exe

  4. Place it in a folder (eg. C:\argo-cli)

  5. Open the environment variables setting and add the folder under System Variables > PATH

  6. To test, open cmd and type argo version

  7. This is how you can configure argocd cli.

This is PART II of my blog " Deploy a Web App to an AKS Cluster using AWS Codepipeline and ArgoCD ". Please check out the referred blog.

Thank you for reading my blog. Happy Learning!!!

References:

  1. https://github.com/argoproj/argo-cd/releases/tag/v2.7.4

  2. https://argo-cd.readthedocs.io/en/stable/getting_started/#2-download-argo-cd-cli

  3. https://spacelift.io/blog/argocd