Maven / 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}}"
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
