Getting Started with ArgoCD

amarchand

Amar Chand

Posted on March 7, 2023

Getting Started with ArgoCD

Overview

In this blog, we shall discuss what ArgoCD is, and how to install it.

ArgoCD

Quoting ArgoCD's website,

ArgoCD is a declarative, gitops Continuous Delivery tool for Kubernetes.

But what is declarative? What is GitOps? and What is Continuous Delivery? Let's understand them one by one, in reverse order.

Continuous Delivery

Continuous Delivery is a software engineering approach, in which code changes are automatically prepared for release in production.

Continuous Delivery is often aided by Continuous Integration. The process says that, once a developer pushes some code, Continuous Integration is leveraged to test the code. Once the code is tested and all the tests are passed, Continuous Delivery tools take the baton, and deploy the code into various environments (i.e. QA, Staging, etc).

GitOps

The term GitOps was coined in 2017 by Weaveworks. Since its inception, it has caught a lot of attention.

GitOps is a way of implementing Continuous Deployment for cloud native applications.

NOTE: Continuous Deployment is almost same to Continuous Delivery, the only difference is that application deployment in production environment requires Approval in Continuous Delivery, while Continuous Deployment directly deploys the code in the production as well.

The main idea behind GitOps is to have a Git repository, which contains the declarative description of the desired infrastructure for the particular environments (let's say production) and an automated process to keep the production environment in the desired state. ArgoCD is one such tool which is capable of doing this.

We will understand this more when we'll deploy our first application using ArgoCD.

Declarative

ArgoCD is declarative in nature. It means that whatever state we define in a manifest file will be achieved by ArgoCD. There is no need to define the procedure.

Installing ArgoCD

Pre-requisites

  • a kuebrnetes cluster (We shall be using Minikube as a primary cluster for further blogs in this series, to know how to install minikube, please refer to Minikube documentation).
  • kubectl utility to interact with the kubernetes cluster you have access to (To install kubectl utility, please refer to Kubernetes documentation).

Installation

There are multiple ways to install Argo CD. You can simply install it by applying plain manifests. You can also use helm chart to deploy it. In case you have an OCP/OKD cluster, then most probably you might want to go with Operator based installation. We are going to discuss the manifests way and helm way in this blog. For operator based installation, please refer the official Argo CD Operator documentation.

The most beginner-friendly way to install Argo CD is to directly deploy it using plain Kubernetes manifests. Run the following commands to do that:

kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
Enter fullscreen mode Exit fullscreen mode

If you want to install Argo using Helm chart,then first add the Argo CD repository to your helm repositories list using the following command:

helm repo add argo https://argoproj.github.io/argo-helm
Enter fullscreen mode Exit fullscreen mode

If you have already added the repository, please run the following command to fetch the information about updated versions:

helm repo update
Enter fullscreen mode Exit fullscreen mode

Now that we have added the helm repository, run the following command to install Argo CD using helm:

helm install argocd argo/argo-cd --version 5.43.0 -n argocd --create-namespace
Enter fullscreen mode Exit fullscreen mode

The above command will install Argo CD in argocd namespace. In the next blog post of this series, we will explore how to login, and we will also deploy our first application via Argo CD.

💖 💪 🙅 🚩
amarchand
Amar Chand

Posted on March 7, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Getting Started with ArgoCD
argocd Getting Started with ArgoCD

March 7, 2023