Skip to content

ArgoCD pour GitOps moderne #264

Description

@khalilbenaz

lede: ArgoCD reste leader GitOps Kubernetes. ApplicationSets, multi-cluster, sync waves. Patterns prod 2026.
lede_en: ArgoCD remains GitOps Kubernetes leader. ApplicationSets, multi-cluster, sync waves. 2026 prod patterns.
title_en: ArgoCD for modern GitOps

ArgoCD — GitOps en pratique

GitOps = git comme source de vérité pour Kubernetes. Push to git → ArgoCD synchronise cluster avec git.

# Application ArgoCD
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: my-app
spec:
  source:
    repoURL: https://github.com/me/k8s-config
    path: apps/my-app/overlays/prod
    targetRevision: main
  destination:
    server: https://kubernetes.default.svc
    namespace: production
  syncPolicy:
    automated:
      prune: true
      selfHeal: true

ArgoCD monitor le repo. Diff cluster vs git. Sync automatique ou manuel.

ApplicationSets

Pour déployer 50 apps similaires sans dupliquer :

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
spec:
  generators:
    - list:
        elements:
          - name: app1
          - name: app2
          - name: app3
  template:
    metadata:
      name: '{{name}}'
    spec:
      source:
        repoURL: https://github.com/me/k8s
        path: 'apps/{{name}}'
      destination:
        server: https://kubernetes.default.svc
        namespace: '{{name}}'

Une définition, N applications déployées.

Sync waves

Pour ordre déploiement :

metadata:
  annotations:
    argocd.argoproj.io/sync-wave: "1"  # CRDs first
---
metadata:
  annotations:
    argocd.argoproj.io/sync-wave: "2"  # Operators
---
metadata:
  annotations:
    argocd.argoproj.io/sync-wave: "3"  # Apps

Wave 1 déployée avant wave 2 avant wave 3.

Multi-cluster

spec:
  destination:
    server: https://cluster-prod-eu.example.com
    namespace: production

ArgoCD gère plusieurs clusters depuis un seul control plane. Pattern : ArgoCD central, clusters spokes.

Vs Flux

Flux est l'alternative CNCF. Différences :

  • ArgoCD : UI excellente, multi-cluster facile, learning curve modérée.
  • Flux : plus minimaliste, CRDs plus simples, sweet spot small-mid.

Pour entreprises : ArgoCD plus utilisé.

Verdict

Pour GitOps Kubernetes en 2026 : ArgoCD est défaut sûr. Setup en 1h, ROI immédiat sur fiabilité déploiements.

ArgoCD — GitOps in practice

GitOps = git as source of truth for Kubernetes. Push to git → ArgoCD syncs cluster with git.

# ArgoCD Application
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: my-app
spec:
  source:
    repoURL: https://github.com/me/k8s-config
    path: apps/my-app/overlays/prod
    targetRevision: main
  destination:
    server: https://kubernetes.default.svc
    namespace: production
  syncPolicy:
    automated:
      prune: true
      selfHeal: true

ArgoCD monitors the repo. Diffs cluster vs git. Auto or manual sync.

ApplicationSets

To deploy 50 similar apps without duplication:

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
spec:
  generators:
    - list:
        elements:
          - name: app1
          - name: app2
          - name: app3
  template:
    metadata:
      name: '{{name}}'
    spec:
      source:
        repoURL: https://github.com/me/k8s
        path: 'apps/{{name}}'
      destination:
        server: https://kubernetes.default.svc
        namespace: '{{name}}'

One definition, N applications deployed.

Sync waves

For deployment order:

metadata:
  annotations:
    argocd.argoproj.io/sync-wave: "1"  # CRDs first
---
metadata:
  annotations:
    argocd.argoproj.io/sync-wave: "2"  # Operators
---
metadata:
  annotations:
    argocd.argoproj.io/sync-wave: "3"  # Apps

Wave 1 deployed before wave 2 before wave 3.

Multi-cluster

spec:
  destination:
    server: https://cluster-prod-eu.example.com
    namespace: production

ArgoCD manages multiple clusters from a single control plane. Pattern: central ArgoCD, spoke clusters.

vs Flux

Flux is the CNCF alternative. Differences:

  • ArgoCD: excellent UI, easy multi-cluster, moderate learning curve.
  • Flux: more minimalist, simpler CRDs, small-mid sweet spot.

For enterprises: ArgoCD more used.

Verdict

For Kubernetes GitOps in 2026: ArgoCD is safe default. 1h setup, immediate ROI on deployment reliability.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions