GitOps for Application Environments: CNPA practice questions
Once a platform runs more than one environment, the GitOps question becomes how to describe several variants of the same application and how to move a change from one environment to the next. The answers are mostly about repository layout and promotion.
By Ibrahim Yesilay · Published · Updated
Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.
What GitOps for Application Environments covers in CNPA
Once a platform runs more than one environment, the GitOps question becomes how to describe several variants of the same application and how to move a change from one environment to the next. The answers are mostly about repository layout and promotion.
Flux's guide to structuring repositories describes the main options. In a monorepo, all Kubernetes manifests live in one repository, with the environment-specific configuration on the same branch, typically main. A common layout has shared bases and per-environment overlays, for example apps/base, apps/staging and apps/production, plus a clusters directory where each cluster's state references the app and infrastructure overlays it should run. Separating apps from infrastructure lets a cluster reconcile add-ons and controllers before the applications that depend on them. In a repo-per-environment layout production gets its own repository; because Git cannot restrict read access to individual files, a separate repository gives tighter control over who sees production configuration, at the cost of more work when promoting changes. The guide also describes repo-per-team and repo-per-app variants. Branches other than main stay short-lived and are deleted once their pull request merges, in line with trunk-based development.
Kustomize provides the overlay mechanism. A base is a directory with a kustomization.yaml containing a set of resources and customizations; an overlay refers to a base and changes what differs, such as replica counts, resource limits, hostnames or image tags, so most YAML is written once. Helm reaches the same result with one chart and a values file per environment.
Promotion is a change to Git. Flux's guidance shows new application releases delivered automatically to staging through image updates to Git, while version bumps for production are pushed to a new branch so that someone can open and approve a pull request. Infrastructure changes can be more disruptive, so the guide suggests merging them to staging first and promoting them to production only after the staging cluster has reconciled and passed conformance tests, with the promotion gated by pull request reviews and end-to-end tests. Flagger canary releases can limit the impact of a problem that escapes staging.
When many clusters need the same application, Argo CD's ApplicationSet controller generates Applications from a single template. Its list generator uses a literal list of clusters, the cluster generator uses the clusters defined in Argo CD, the Git generator derives parameters from files or directories in a repository, and the matrix generator combines two generators. It also improves self-service in multitenant clusters, letting tenants deploy without a cluster administrator enabling each destination, although the documentation asks readers to understand the security implications first.
Misconceptions: one long-lived branch per environment is not a GitOps requirement, copying complete manifests for each environment is unnecessary, and promotion should never mean rebuilding the image for production.
At associate level, expect questions about choosing a repository layout, using overlays for environment differences, gating promotion to production, and generating per-cluster deployments from one definition.
Key points
- Monorepo with base and per-environment overlays, or a separate repository for production access control.
- Kustomize overlays patch a shared base; Helm uses one chart with per-environment values.
- Promote by changing Git: automatic to staging, pull request approval for production.
- ApplicationSet generators (list, cluster, Git, matrix) stamp out Applications across clusters.
Three sample questions
8 CNPA questions on GitOps for Application Environments, 8 with explanations. How practice works
Question 1
- A.The Git generator
- B.The Cluster generator
- C.A Kustomize overlay
- D.The List generator
Correct answer: B
Sources: CNCF CNPA curriculum (CNPA_Curriculum.pdf), Argo CD: ApplicationSet controller
Question 2
envs/dev, envs/staging, envs/prod). The team wants Argo CD to create one Application per folder automatically. Which ApplicationSet generator matches?- A.The Git generator
- B.The List generator
- C.A Flux Kustomization
- D.The Cluster generator
Correct answer: A
Sources: CNCF CNPA curriculum (CNPA_Curriculum.pdf), Argo CD: ApplicationSet controller
Question 3
- A.A GitRepository can only be consumed by a HelmRelease, not by a Kustomization.
- B.Sources are fetched only once, when they are created, so both paths must exist on day one.
- C.Each Kustomization must point to its own Git repository, so one per environment is required.
- D.A source may be shared by several consumers, deduplicating configuration and storage.
Correct answer: D
Sources: CNCF CNPA curriculum (CNPA_Curriculum.pdf), Flux: Core concepts
Practice this topic
Focus mode keeps every question on GitOps for Application Environments until you leave it. 10 free guest answers, then a free account; no credit card.
Or open CNPA practice across all topics.
Sources
The explanation above was checked against these official documents.
- Flux documentation: Ways of structuring your repositories (checked 2026-10-28)
- Kubernetes documentation: Declarative Management of Kubernetes Objects Using Kustomize (checked 2026-10-28)
- Argo CD documentation: Introduction to ApplicationSet controller (checked 2026-10-28)