Skip to content

ArgoCD

DEPRECATED

Since i started using Gitness as CI/CD i deploy everything with pipelines as code. This means i stopped using ArgoCD.

Installing ArgoCD on My K3s Homelab

In my homelab, I've already set up a K3s cluster with one master node and multiple worker nodes. Now, it's time to add ArgoCD to the mix. ArgoCD is a popular tool for managing GitOps workflows and continuous delivery. Let me guide you through the process of installing ArgoCD on my K3s cluster, all from the master node.

Prerequisites

Before we begin, make sure you have the following prerequisites in place:

  • A working K3s cluster with a master node and at least one worker node.
  • SSH access to your master node.
  • Kubectl command-line tool installed on your master node. If it's not installed, you can do so by running:
curl -LO https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin/

Installation Steps

Now, let's proceed with the installation of ArgoCD.

Add the ArgoCD Helm repository

Add the ArgoCD Helm repository to your Helm client. Run the following command:

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

Install ArgoCD using Helm

Now that the repository is added, you can install ArgoCD by running the following command:

kubectl create namespace argocd
helm install argocd argo/argo-cd -n argocd

Port Forward to Access the ArgoCD Web UI

To access the ArgoCD web UI, you'll need to set up port forwarding. Run the following command to do this:

kubectl port-forward svc/argocd-server -n argocd 8080:443

Now, you can access the ArgoCD web UI by opening your web browser and navigating to https://localhost:8080.

Initial Login

To log in to ArgoCD for the first time, you'll need the initial password. Retrieve it by running:

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

Use the generated password to log in as the initial admin user.

LoadBalancer

If you want to access the Arog UI through a LoadBalancer IP in your local network:

kubectl patch service argocd-server -n argocd --patch '{ "spec": { "type": "LoadBalancer", "loadBalancerIP": "192.168.86.52" } }'