Install ArgoCD via Helm

Why Helm?


I will explain how to install ArgoCD via Helm. ArgoCD is a highly popular tool for GitOps with Kubernetes. Its new features are developed at a fast pace. Therefore, when you want to try out new features, you need to upgrade ArgoCD. However, upgrading ArgoCD can be time-consuming due to its numerous components. Helm can help you manage ArgoCD more efficiently.

  1. Preparation
  2. Add argo’s chart repository
  3. Create a namespace
  4. Install ArgoCD
    1. Check available charts’ versions and ArgoCD’s versions
    2. Prepare a values.yaml
    3. Install ArgoCD
    4. Check resources of ArgoCD
    5. Access ArgoCD UI via browser
  5. Clean up
  6. Next Steps

Preparation

Please install tools below.

  • kubernetes
  • kubectl
  • helm

Here are my versions of each tool for reference.

$ minikube profile list
|----------|-----------|---------|--------------|------|---------|---------|-------|--------|
| Profile  | VM Driver | Runtime |      IP      | Port | Version | Status  | Nodes | Active |
|----------|-----------|---------|--------------|------|---------|---------|-------|--------|
| minikube | docker    | docker  | 192.168.49.2 | 8443 | v1.26.3 | Running |     1 | *      |
|----------|-----------|---------|--------------|------|---------|---------|-------|--------|
$ kubectl version --short --client=true 2>/dev/null
Client Version: v1.27.2
Kustomize Version: v5.0.1
$ helm version                   
version.BuildInfo{Version:"v3.12.0", GitCommit:"c9f554d75773799f72ceef38c51210f1842a1dea", GitTreeState:"clean", GoVersion:"go1.20.4"}

Add argo’s chart repository

ArgoCD’s Helm Charts are maintained on argoproj/argo-helm. Also, they are hosted at https://argoproj.github.io/argo-helm/ . Let’s add it to your helm.

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

There are several argoproj charts in the repository. You can see what charts are in the repository by helm search repo argo.

$ helm search repo argo     
NAME                            CHART VERSION   APP VERSION     DESCRIPTION                                       
argo/argo                       1.0.0           v2.12.5         A Helm chart for Argo Workflows                   
argo/argo-cd                    5.36.1          v2.7.4          A Helm chart for Argo CD, a declarative, GitOps...
argo/argo-ci                    1.0.0           v1.0.0-alpha2   A Helm chart for Argo-CI                          
argo/argo-events                2.3.3           v1.7.6          A Helm chart for Argo Events, the event-driven ...
argo/argo-lite                  0.1.0                           Lighweight workflow engine for Kubernetes         
argo/argo-rollouts              2.31.0          v1.5.0          A Helm chart for Argo Rollouts                    
argo/argo-workflows             0.29.2          v3.4.8          A Helm chart for Argo Workflows                   
argo/argocd-applicationset      1.12.1          v0.4.1          A Helm chart for installing ArgoCD ApplicationSet 
argo/argocd-apps                1.2.0                           A Helm chart for managing additional Argo CD Ap...
argo/argocd-image-updater       0.9.1           v0.12.2         A Helm chart for Argo CD Image Updater, a tool ...
argo/argocd-notifications       1.8.1           v1.2.1          A Helm chart for ArgoCD notifications, an add-o...
bitnami/argo-cd                 4.5.7           2.6.7           Argo CD is a continuous delivery tool for Kuber...
bitnami/argo-workflows          5.1.14          3.4.7           Argo Workflows is meant to orchestrate Kubernet...

Create a namespace

kubectl create namespace argocd

Install ArgoCD

Check available charts’ versions and ArgoCD’s versions

You can check available versions via helm search with –versions option.

helm search repo argo/argo-cd --versions | head -5

example:

NAME            CHART VERSION   APP VERSION     DESCRIPTION                                       
argo/argo-cd    5.36.1          v2.7.4          A Helm chart for Argo CD, a declarative, GitOps...
argo/argo-cd    5.36.0          v2.7.4          A Helm chart for Argo CD, a declarative, GitOps...
argo/argo-cd    5.35.1          v2.7.4          A Helm chart for Argo CD, a declarative, GitOps...
argo/argo-cd    5.35.0          v2.7.3          A Helm chart for Argo CD, a declarative, GitOps...

This time, I chose the latest version (5.36.1) that uses v2.7.4 ArgoCD.

Prepare a values.yaml

In Helm, you can change application’s configuration by a values file. You can find and download the ArgoCD’s values file in GitHub or ArtifactHUB. This time, we will download it from GitHub.

wget https://github.com/argoproj/argo-helm/blob/argo-cd-5.36.1/charts/argo-cd/values.yaml

If you’d like to change some configurations, please edit the values.yaml. You can explore the configurations in the doc. This time, I won’t modify values.yaml and will use default configurations.

Warning: If you are installing ArgoCD for production use, please check SSL and other security settings carefully.

Install ArgoCD

Install ArgoCD by helm install.

helm install my-argocd argo/argo-cd --namespace argocd --version 5.36.1 -f values.yaml

example:

NAME: my-argocd
LAST DEPLOYED: Sun Jun 11 15:17:11 2023
NAMESPACE: argocd
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
In order to access the server UI you have the following options:
1. kubectl port-forward service/my-argocd-server -n argocd 8080:443
    and then open the browser on http://localhost:8080 and accept the certificate
2. enable ingress in the values file `server.ingress.enabled` and either
      - Add the annotation for ssl passthrough: https://argo-cd.readthedocs.io/en/stable/operator-manual/ingress/#option-1-ssl-passthrough
      - Set the `configs.params."server.insecure"` in the values file and terminate SSL at your ingress: https://argo-cd.readthedocs.io/en/stable/operator-manual/ingress/#option-2-multiple-ingress-objects-and-hosts
After reaching the UI the first time you can login with username: admin and the random password generated during the installation. You can find the password by running:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
(You should delete the initial secret afterwards as suggested by the Getting Started Guide: https://argo-cd.readthedocs.io/en/stable/getting_started/#4-login-using-the-cli)

Warning: If you are installing ArgoCD for production use, you should delete the initial secret afterwards as suggested by the Getting Started Guide.

Check resources of ArgoCD

ArgoCD has many components. Let’s take a look at them.

kubectl get -n argocd "$(kubectl api-resources --namespaced=true --verbs=list -o name | tr "\n" "," | sed -e 's/,$//')"

You can see many resources such as Services, Deployments, ConfigMaps and Secrets. Also, you can see CustomResourceDefinitions by the following commands.

kubectl get customresourcedefinitions.apiextensions.k8s.io | grep argo

Access ArgoCD UI via browser

Get ArgoCD’s admin password.

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

Set port-forward to the service.

kubectl port-forward service/my-argocd-server -n argocd 8080:443

Access http://localhost:8080 and accept the certificate, then enter Username: admin and Password that you got above.

Login Page

Congratulations! You have now completed installing ArgoCD.

Top Page

Clean up

If you don’t need ArgoCD anymore, please delete resources by the following commands.

helm uninstall my-argocd -n argocd
kubectl delete customresourcedefinitions.apiextensions.k8s.io applications.argoproj.io applicationsets.argoproj.io appprojects.argoproj.io

Next Steps

Now, we can use ArgoCD. I’d like to share how to manage applications by ArgoCD.

That’s it. Thank you for reading my post.