Skip to main content

Installation and Configuration


Table of Contents

  1. Prerequisites
  2. Standard installation
  3. HA installation
  4. Accessing the interface
  5. Initial configuration
  6. Hands-on exercises

1 - Prerequisites

Kubernetes cluster

# Vérifier kubectl
kubectl version --client

# Vérifier l'accès au cluster
kubectl cluster-info

# Version minimum : Kubernetes 1.22+

Local cluster options

OptionCommand
minikubeminikube start --memory=4096
kindkind create cluster
k3s`curl -sfL https://get.k3s.io
Docker DesktopEnable Kubernetes in the settings
ComponentCPUMemory
API Server100m128Mi
Repo Server100m256Mi
Controller100m256Mi
Redis50m64Mi
Total350m704Mi

🔝 Back to table of contents


2 - Standard installation

Method 1: kubectl apply

# Créer le namespace
kubectl create namespace argocd

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

# Vérifier l'installation
kubectl get pods -n argocd

Method 2: Helm

# Ajouter le repo Helm
helm repo add argo https://argoproj.github.io/argo-helm
helm repo update

# Installer
helm install argocd argo/argo-cd \
--namespace argocd \
--create-namespace

# Avec valeurs personnalisées
helm install argocd argo/argo-cd \
--namespace argocd \
--create-namespace \
-f values.yaml

Verification

# Attendre que tous les pods soient prêts
kubectl wait --for=condition=Ready pods --all -n argocd --timeout=300s

# Lister les pods
kubectl get pods -n argocd

# Résultat attendu
NAME READY STATUS RESTARTS
argocd-application-controller-0 1/1 Running 0
argocd-dex-server-xxx 1/1 Running 0
argocd-redis-xxx 1/1 Running 0
argocd-repo-server-xxx 1/1 Running 0
argocd-server-xxx 1/1 Running 0

🔝 Back to table of contents


3 - HA installation (High Availability)

When to use HA?

  • Production with strict SLA
  • More than 100 applications
  • Large-scale multi-cluster

HA installation

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

Differences from the standard installation

ComponentStandardHA
API Server1 replica2+ replicas
Repo Server1 replica2+ replicas
Controller1 replica1 (with sharding)
RedisStandaloneRedis Sentinel

Redis HA configuration

# values.yaml pour Helm HA
redis-ha:
enabled: true
haproxy:
enabled: true

🔝 Back to table of contents


4 - Accessing the interface

Method 1: Port-forward (development)

# Port-forward vers le service
kubectl port-forward svc/argocd-server -n argocd 8080:443

# Accéder à https://localhost:8080

Method 2: LoadBalancer

# Modifier le service
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'

# Récupérer l'IP externe
kubectl get svc argocd-server -n argocd

Method 3: Ingress

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: argocd-server
namespace: argocd
annotations:
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
ingressClassName: nginx
rules:
- host: argocd.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: argocd-server
port:
number: 443

Retrieve the admin password

# Le mot de passe initial est stocké dans un secret
kubectl -n argocd get secret argocd-initial-admin-secret \
-o jsonpath="{.data.password}" | base64 -d && echo

# Connexion
# Username: admin
# Password: (la valeur ci-dessus)

Change the password

# Via CLI
argocd account update-password

# Ou supprimer le secret initial après changement
kubectl -n argocd delete secret argocd-initial-admin-secret

🔝 Back to table of contents


5 - Initial configuration

Install the CLI

# macOS
brew install argocd

# Linux
curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd
rm argocd-linux-amd64

# Windows (avec chocolatey)
choco install argocd-cli

Connect to the server

# Login
argocd login localhost:8080

# Avec port-forward en arrière-plan
kubectl port-forward svc/argocd-server -n argocd 8080:443 &
argocd login localhost:8080 --username admin --password <password>

# Vérifier la connexion
argocd version

Add a Git repository

# Repository public
argocd repo add https://github.com/org/gitops-repo.git

# Repository privé (HTTPS)
argocd repo add https://github.com/org/private-repo.git \
--username git \
--password <token>

# Repository privé (SSH)
argocd repo add [email protected]:org/private-repo.git \
--ssh-private-key-path ~/.ssh/id_rsa

Configure via ConfigMap

apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
namespace: argocd
data:
# URL du serveur
url: https://argocd.example.com

# Timeout pour les opérations
timeout.reconciliation: 180s

# Activer les status badges
statusbadge.enabled: "true"

🔝 Back to table of contents


6 - Hands-on exercises

Exercise 1: Local installation

# 1. Créer un cluster local
minikube start --memory=4096

# 2. Installer Argo CD
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

# 3. Attendre les pods
kubectl wait --for=condition=Ready pods --all -n argocd --timeout=300s

# 4. Récupérer le mot de passe
kubectl -n argocd get secret argocd-initial-admin-secret \
-o jsonpath="{.data.password}" | base64 -d && echo

# 5. Port-forward et accéder
kubectl port-forward svc/argocd-server -n argocd 8080:443

Quiz

Q1. Which namespace is created by default for Argo CD?

Answer

The argocd namespace. This is the standard namespace used in the official manifests.

Q2. How do you retrieve the initial admin password?

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

🔝 Back to table of contents


Key takeaways

  • Simple installation via kubectl apply or Helm
  • HA for large-scale production
  • Access via port-forward, LoadBalancer or Ingress
  • The initial password is in a Secret
  • argocd CLI for administration

← Previous chapter | Next chapter: Concepts →