Installing and Configuring ArgoCD : A Step-by-Step Guide

Introduction

ArgoCD is a declarative, GitOps continuous delivery tool for Kubernetes. It allows you to manage your Kubernetes resources using Git repositories as the source of truth.

Prerequisites

Before you begin, ensure you have the following:

  • A Kubernetes cluster

  • kubectl command-line tool installed

Installation

Before installing ArgoCD, make sure that your Kubernetes cluster is up and running! You can verify using the below command:

minikube status

You will get an output like this:

Minikube Status

We can install ArgoCD in three ways:

  1. Plain Manifests

  2. Helm Charts

  3. Operators

In this blog, I will show you how to install using Plain Manifests.

Step 1:

Open your command line interface and run the following command:

kubectl create namespace argocd

Create Namespace

This command creates a namespace called "argocd".

Next, run the below command:

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

Apply Manifests

Step 2:

Once ArgoCD is installed, wait for the pods to come up. You can view the pods by running the following command:

kubectl get pods -n argocd -w

Get Pods

Step 3:

Once the pods are up and running, run the following command in your command line interface:

kubectl get svc -n argocd

This command lists the services available in the "argocd" namespace. The ArgoCD server is responsible for interacting with the UI using the command line interface.

Get Services

Step 4:

Next, run the following command:

kubectl edit svc argocd-server -n argocd

The reason for editing the "argocd-server" file is that, by default, the ArgoCD server type is set to ClusterIP. We need to change the type of "argocd-server" from ClusterIP to NodePort to access the service from the browser.

Edit Service

Edit Service

Step 5:

Since we have changed the type from ClusterIP to NodePort, we can now access the service from the terminal. However, if we want to access it using a browser, we need to do port forwarding or tunneling.

To do that, run the following command to list the services in the "argocd" namespace:

minikube service list -n argocd

Service List

Now, run the command below:

minikube service argocd-server -n argocd

This command creates a tunnel and provides you an IP address to access it.

Service Tunnel

The first URL is for HTTP access, and the second URL is for HTTPS access. Paste either URL into your browser.

After pasting the URL, you will see a caution message like this:

Security Warning

Click on "Proceed". After clicking on "Proceed", you will be on the ArgoCD login page.

Login Page

Step 6:

To log in to ArgoCD, we need a username and password.

The username is "admin."

To get the password, open a new tab in the command line interface and run the following command:

kubectl get secret -n argocd

The above command lists the secrets in the "argocd" namespace.

Get Secret

Now go to the "argocd-initial-admin-secret" by running the following command:

kubectl edit secret argocd-initial-admin-secret -n argocd

The above command opens the "argocd-initial-admin-secret" file where the password is stored. Now, copy the password as shown below.

Copy Password

Since the password is encrypted in base64 format, we need to decrypt it.

To decrypt it, run the following command:

echo "your_password" | base64 --decode

Replace "your_password" with the original password. Now, paste the decrypted password in ArgoCD.

And that's it! You are now successfully logged into ArgoCD.

ArgoCD Dashboard

Thanks for reading my blog!

Did you find this article valuable?

Support Sujith Sai by becoming a sponsor. Any amount is appreciated!