Skip to main content

How to Deploy Argo CD in Kubernetes

·267 words·2 mins

This guide will show you how to deploy Argo CD in Kubernetes behind Traefik (or any other ingress controller of your choice).

Prerequisites
#

  • Helm
  • Traefik

1. Creating Helm chart values.
#

Because we are deploying Argo CD behind an ingress controller, there is a helm value we need to define to disables Argo CD’s redirection from HTTP to HTTPS because our ingress controller will be handling this instead.

# values.yaml
configs:
  params:
    server.insecure: true

2. Installing Argo CD with Helm
#

To install Argo CD with Helm, you can use the following commands

helm repo add argo https://argoproj.github.io/argo-helm
helm install argocd argo/argo-cd --namespace argocd --create-namespace -f values.yaml

3. Creating an ingressroute in Traefik
#

Now we need to create an ingressroute so that we can access the web UI for Argo CD.

Here is the manifest I am using, you can tweak it as you like.

apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: argocd-server
  namespace: argocd
spec:
  entryPoints:
    - websecure
  routes:
    - kind: Rule
      match: Host(`argocd.internal.dontddos.me`)
      priority: 10
      services:
        - name: argocd-server
          port: 80
    - kind: Rule
      match: Host(`argocd.internal.dontddos.me`) && Header(`Content-Type`, `application/grpc`)
      priority: 11
      services:
        - name: argocd-server
          port: 80
          scheme: h2c

Once you apply that, you should be able to access the ArgoCD web UI.

4. Getting the default admin password
#

The default admin password can be obtained by running the following command:

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

Ignore the % at the end, it is not part of the password.

Done
#

If all went well, you should now be able to access the web UI and login.

DontDDoS
Author
DontDDoS
KUBERNETES!!!