GitOps – Getting started with ArgoCD
Tags: kubernetes, gitops, cicd
Published: 2021-05-12 06:29:37

---
title: GitOps – Getting started with ArgoCD
published: true
date: 2021-05-10 15:02:52 UTC
tags: Kubernetes, GitOps, CICD 
canonical_url: https://vzilla.co.uk/vzilla-blog/gitops-getting-started-with-argocd
---

Last week at the Kasten booth at KubeCon 2021 EU I gave a 30-minute session on “Incorporating data management into your continuous deployment workflows and GitOps model” the TLDR was that with Kasten K10 we can use BackupActions and hooks from your favourite CD tool to make sure that with any configuration change you are also going to take a backup of your configuration before the change but most importantly the data will also be grabbed. This will become more apparent and more useful when you are leveraging ConfgMaps to interact with data that is being consumed and added by an external group of people and data is not stored within version control.

Continuous Integration and Continuous Deployment seem to come hand in hand in all conversations but actually they are or at least to me they can be too different and separate workflows completely. It is important to note here that this walkthrough is not focusing on Continuous integration but more so on the Deployment / Delivery of your application and incorporating data management into your workflows.

![050921 1635 GitOpsGetti1](https://vzilla.co.uk/wp-content/uploads/2021/05/050921_1635_GitOpsGetti1.png "GitOps – Getting started with ArgoCD 12")

# Deploying ArgoCD

Before we get into the steps and the scenario, we need to deploy our Continuous Deployment tool, for this demo I am going to be using ArgoCD.

I hear you cry “But what is ArgoCD?” – “_Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes_”

Version control is the key here, ever made a change to your environment on the fly and have no recollection of that change and because the lights are on and everything is green you continue to keep plodding along? Ever made a change and broke everything or some of everything? You might have known you made the change and you can quickly roll back your change, that bad script or misspelling. Now ever done this a massive scale and maybe it was not you or maybe it was not found straight away and now the business is suffering. Therefore, version control is important. Not only that but “_Application definitions, configurations, and environments should be declarative, and version controlled_.” On top of this (which comes from ArgoCD), they also mention that “_Application deployment and lifecycle management should be automated, auditable, and easy to understand_.”

From an Operations background but having played a lot around Infrastructure as Code this is the next step to ensuring all of that good stuff is taken care of along the way with continuous deployment/delivery workflows.

Now we go ahead and deploy ArgoCD into our Kubernetes cluster. Before I deploy anything I like to make sure that I am on the correct cluster with normally running the following command to check my nodes. We then also need to create a namespace.

#Confirm you are on the correct cluster

kubectl get nodes  
#Create a namespace  
kubectl create namespace argocd  
#Deploy CRDs  
kubectl apply -n argocd -f [https://raw.githubusercontent.com/argoproj/argo-cd/v2.0.0-rc3/manifests/install.yaml](https://raw.githubusercontent.com/argoproj/argo-cd/v2.0.0-rc3/manifests/install.yaml)

![050921 1635 GitOpsGetti2](https://vzilla.co.uk/wp-content/uploads/2021/05/050921_1635_GitOpsGetti2.png "GitOps – Getting started with ArgoCD 13")

When all ArgoCD pods are up running you can confirm this by running the following command.

```
#Confirm all CRDs are deployedkubectl get all -n argocd
```

![050921 1635 GitOpsGetti3](https://vzilla.co.uk/wp-content/uploads/2021/05/050921_1635_GitOpsGetti3.png "GitOps – Getting started with ArgoCD 14")

When the above is looking good, we then should consider accessing this via the port forward. Using the following command.

```
#When everything is ready, we want to access the ArgoCD UIkubectl port-forward svc/argocd-server -n argocd 8080:443
```

![050921 1635 GitOpsGetti4](https://vzilla.co.uk/wp-content/uploads/2021/05/050921_1635_GitOpsGetti4.png "GitOps – Getting started with ArgoCD 15")

Now we can connect to ArgoCD, navigate to your port forward using your [https://localhost:8080](https://localhost:8080) address and you should have the below screen.

![050921 1635 GitOpsGetti5](https://vzilla.co.uk/wp-content/uploads/2021/05/050921_1635_GitOpsGetti5.png "GitOps – Getting started with ArgoCD 16")

To log in you will need a username of admin and then to grab your created secret as your password use the following command, I am using WSL and an Ubuntu instance to grab the following command if you are using Windows then there are Base64 tools out there apparently I just have been trying to immerse myself into Linux.

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

![050921 1635 GitOpsGetti6](https://vzilla.co.uk/wp-content/uploads/2021/05/050921_1635_GitOpsGetti6.png "GitOps – Getting started with ArgoCD 17")

When you log in for the first time you will not see the boxes that I have in play around apps I have already deployed. You will have a blank canvas.

![050921 1635 GitOpsGetti7](https://vzilla.co.uk/wp-content/uploads/2021/05/050921_1635_GitOpsGetti7.png "GitOps – Getting started with ArgoCD 18")

# Another way to Deploy, Maybe easier

Now the above method works and you can then start working on the next post that walks through the actual demo I performed in the session, but I also want to shout out [arkade](https://github.com/alexellis/arkade) as another option to deploy not only ArgoCD but many different other tools that are useful in your Kubernetes environments.

The following command will get arkade installed on your system

```
# Note: you can also run without `sudo` and move the binary yourselfcurl -sLS https://dl.get-arkade.dev | sudo sh
```

![050921 1635 GitOpsGetti8](https://vzilla.co.uk/wp-content/uploads/2021/05/050921_1635_GitOpsGetti8.png "GitOps – Getting started with ArgoCD 19")

The first thing to do is check out the awesome list of apps available on arkade.

```
arkade get
```

![050921 1635 GitOpsGetti9](https://vzilla.co.uk/wp-content/uploads/2021/05/050921_1635_GitOpsGetti9.png "GitOps – Getting started with ArgoCD 20")

Now back to this way of deployment of ArgoCD, we can now simply run this one command to get up and running.

```
arkade get argocd
```

![050921 1635 GitOpsGetti10](https://vzilla.co.uk/wp-content/uploads/2021/05/050921_1635_GitOpsGetti10.png "GitOps – Getting started with ArgoCD 21")

What if we want to find out more of the options available to us within the ArgoCD deployment, arkade has good info on all the apps to give detail about gaining access and what needs to happen next if you are unsure.

![050921 1635 GitOpsGetti11](https://vzilla.co.uk/wp-content/uploads/2021/05/050921_1635_GitOpsGetti11.png "GitOps – Getting started with ArgoCD 22")

In the next post, we are going to be walking through the demo aspects of the session.