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
Installed Kubectl command-line tool.
Have a kubeconfig file (the default location is
~/.kube/config
). which you will have when you have Kubernetes cluster configuration.To configure Kubernetes cluster say AKS you can check out my blog " How to Configure AKS cluster using Azure Portal and Terraform "
Installation of Argocd on Kubernetes Cluster:
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/..
Run >> kubectl -n argocd get all to view the pods, services, deployments etc for Argocd namespace.
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
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
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.
To view the UI, Paste the External Ip of your cluster in your browser.
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
Now login to the page using that password.
It is better to update your password. Go to user info--> update password
Installing ArgoCD CLI
Navigate to the link ArgoCD-CLI
As I have a Windows machine, I am downloading windows**.exe
Rename the argo-windows-amd64.exe to argo.exe
Place it in a folder (eg. C:\argo-cli)
Open the environment variables setting and add the folder under System Variables > PATH
To test, open cmd and type
argo version
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!!!