DevOps / GitOps Interview Questions
What are Argo CD Applications and ApplicationSets?
An Application is the fundamental Argo CD custom resource. It maps a single Git source (repository URL, path, revision) to a single Kubernetes destination (cluster API URL, namespace) and declares how to sync between them. One Application typically represents one microservice or one component of a larger system.
An ApplicationSet is a higher-level CR managed by the ApplicationSet controller. Instead of managing one application, it uses generators to programmatically produce multiple Application CRs from a template. As generators produce or remove parameters, the controller creates, updates, or deletes the corresponding Applications automatically.
Built-in ApplicationSet generators:
- List generator: Explicit list of parameter sets — each item creates one Application.
- Git directory generator: Scans a Git repo for directories matching a glob pattern; each directory becomes one Application.
- Cluster generator: Creates one Application per registered Argo CD cluster, optionally filtered by cluster labels.
- Matrix generator: Cross-product of two other generators — e.g., all apps × all clusters.
- Pull-request generator: Creates a temporary Application for each open PR, enabling ephemeral preview environments.
# ApplicationSet using the git directory generator
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: all-apps
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/org/gitops-config.git
revision: main
directories:
- path: apps/*
template:
metadata:
name: "{{path.basename}}"
spec:
project: default
source:
repoURL: https://github.com/org/gitops-config.git
targetRevision: main
path: "{{path}}"
destination:
server: https://kubernetes.default.svc
namespace: "{{path.basename}}"
More Related questions...