Skip to main content
InterviewHubPRO
Section Overview
Q13

Question 13 of 50

Part 2: ArgoCD at Scale & Progressive Delivery (Mid-Level)

26%
GitOps & ArgoCD (50 Qs)•Part 2: ArgoCD at Scale & Progressive Delivery (Mid-Level)

What is the ArgoCD `ApplicationSet` CRD?

senior LevelCode ExamplegitopsArgoCD at Scale

In Simple Words: Managing 500 individual Application YAMLs manually is unmaintainable. ApplicationSet is a controller that automates the generation of ArgoCD Application resources using Generators:

  1. List Generator: Generates applications based on a fixed list of environments.
  2. Git Directory Generator: Scans a Git repository and creates an application for every subfolder.
  3. Cluster Generator: Automatically deploys applications to all clusters labeled with env: production registered in ArgoCD.
  4. Matrix Generator: Combines multiple generators (e.g., all clusters × all microservices).
yaml
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: microservices
  namespace: argocd
spec:
  generators:
    - git:
        repoURL: https://github.com/enterprise/gitops.git
        revision: main
        directories:
          - path: services/*
  template:
    metadata:
      name: '{{path.basename}}'
    spec:
      project: default
      source:
        repoURL: https://github.com/enterprise/gitops.git
        targetRevision: main
        path: '{{path}}'
      destination:
        server: https://kubernetes.default.svc
        namespace: '{{path.basename}}'