Only registred users can make comments

How to Install ArgoCD with Helm On Local Dev Cluster

ArgoCD GitOps Workflow

The Kubernetes community has widely embraced GitOps, with ArgoCD and Flux being among the most popular tools. I'd claim it very much about those two tools.

Personally, I am a huge fan of GitOps. It's something I always hoped for, even though I didn't know exactly what I was looking for a decade or two ago. It's probably the declarative approach, the level of automation, and the self-resilience that appeal to me. Today, it's a reality, and it's wonderful how well we can manage our environments, including infrastructure and the applications.

If you work a lot with ArgoCD, or just want to learn, you probably want to have it in your local dev environment to test your deployments. This short guide will show you how to install ArgoCD using Helm with custom values, having a custom setup for your specific environment. We will be using custom values by extracting the upstream value file and modifying specific settings to suit our needs.

What is ArgoCD

ArgoCD is a declarative, GitOps continuous delivery tool for Kubernetes. It automates the deployment of the desired application states in your Kubernetes cluster, directly from Git repositories.

Video that introduces you to GitOps:
https://devoriales.com/video/897990746/intro-to-gitops

Requirements

Before starting, ensure you have the following tools installed and configured:

  1. Kubernetes cluster
  2. kubectl - Kubernetes command-line tool
  3. Helm 3.x - Helm package manager for Kubernetes
  4. Ingress Controller - For managing external access to ArgoCD and services in your cluster.

There are some tutorials that you can follow if you lack some of these tools:

Set up your own cluster:
https://devoriales.com/post/267/creating-a-local-multi-node-k8s-cluster-with-microk8s-and-multipass

Set up ingress controller:
https://devoriales.com/post/342/how-to-configure-ingress-nginx-for-local-kubernetes-development

Installation

Add the ArgoCD Helm Repository

First, add the ArgoCD Helm repository to your local Helm configuration and update it.

helm repo add argo https://argoproj.github.io/argo-helm
helm repo update

Extract and Customize Values

Extract the default values provided by the ArgoCD Helm chart into a file. This allows you to customize the installation to fit your needs.

helm show values argo/argo-cd > values.yaml

Open the values.yaml file in your preferred text editor and make the necessary changes. For this example, we will change the following configurations:

Server Properties: Run the server without TLS for local cluster testing:

server:
  insecure: true

Enable Ingress and Set Class Name: Enable ingress and set the ingress class to nginx or whatever ingress controller class you use:

ingress:
  enabled: true
  controller: generic
  ingressClassName: "nginx"

Set the Domain: Configure the global domain used by all components:

global:
  domain: argocd.devoriales.local

❗change the domain to your own

Install ArgoCD with Custom Values

After customizing the values.yaml file, use Helm to install ArgoCD with these custom values:

helm install my-argo-cd argo/argo-cd --version 7.2.0 -f values.yaml

Verify the Installation

To ensure ArgoCD has been installed correctly, check the status of the Helm release and the deployed Kubernetes resources:

helm list -A
kubectl get all -n argocd

You'll need to have the initial admin account password. You can get it with the following command:

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

Open your browser and log in to argocd to verify that everything works as expected:


argocd login

Congratulations, now you have your own ArgoCD to play around with.

 

Comments