ArgoCD -GitOps tool

saurabh kharkate
4 min readJun 6, 2022

Hello Everyone, hope you guys learning each day. Here I came up with another article on Intresting DevOps Tool called ArgoCD.

ArgoCD one of the most popular continues deployment tools used in Kubernetes. It is very simple to use and quite powerful. Hope you will enjoyed reading this article and learn about ArgoCD.

so lets, Start with the hands on practical

Steps to do in this practical:

  • Installing Agrocd on kubernetes cluster.
  • Configuring github url with argocd.
  • Deploying simple application Project with the help of ArgoCD using github url
  • Setting up Continous Deployment of Applicatoin using sync policy.

here I already configured Kubernetes Cluster on my machine. you can use my previous article how to configure kubernetes cluster.

Step 1: Installing ArgoCD on kubernetes Cluster

Create Namespace argocd and Apply argocd deployment yaml …(Official)

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

Step 2: Checking pods of ArgoCD

Check All pods are running or not

kubectl get pods -n argocd

Step 3: Exposing service of ArgoCD

kubectl edit argocd-server -n argocd

As you can find in the above gif that argocd-server service is running on ClusterIP service. so we have to expose it to outside cluster.

kubectl edit svc argocd-server -n argocd

So we will edit the service file of argocd-server and change the service from ClusterIP to NodePort so we can access from outside the cluster.

Step 4: Checking svc Exposed or not?

Now check the svc changes to nodeport or not?

kubectl get svc -n argocd

As you can see above gif argocd-server changes to NodePort service now open the web browser with IP:NodePort

Step 5: Login to UI of ArgoCD

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

Using the above code you can get the password of the admin user of ArgoCD.

After login successfully you will get the application page. The application page will helps you to create applications

Step 6: Create and Deploy New Application using Github repo url.

In this Step Creating a new app using github url. so Here I have a Github repo it contains all menifest files of deployment and service which will required for the ArgoCD to deploy our application on kubernetes..

As Shown in above gif Creating New and providing my github url and path of the menifests files in the repo with Head branch i.e main in my case.

Application Name: myapp

Project: default

SyncPolicy: Automatic/manual

RepositoryURL : https://github.com/SaurabhSK123/AgroCDtest.git

Branch : Head

Path : yamls(Paths of yamls in repo)

Step 7 : Check our Web App Deployed or not ?

Here Our Application Deployed Sucessfully..

Step 8 : Continous Depolyment Test

Now for continous deployment we have to change , commit , build , and push to Git repo, then ArgoCD will automatically redeploy our application with new code without downtime..

lets change code and build with docker image

Step 9: Change deploy menifest , commit and push to git repository…

Step 10: Check Status of Application

Now check the status of Application on Agrocd UI ..you will see auto deployment of application with new code..

Here Our Application deployed successfully with new changes without downtime.

Hope you guys enjoyed reading this article

Thanks for reading..🙏😃

Keep Sharing !!! Keep Learning !!!

--

--