CGOA practice question 6 of 15

Which of these is an advantage of using a declarative configuration for your Desired State?

Full set: 60 questions
Answer options
A: Declarative configuration allows you to execute code locally more efficiently to make desired changes to your running system.
B: Using widely adopted community tools for reconciling actual state is less work than maintaining custom imperative scripts. Correct answer
C: Declarative configuration helps you include dynamic scripting that guides an application through a step-by-step process.
D: Declarative configuration lets you specify complex if/else logic within custom code.
Correct Answer:
B. Using widely adopted community tools for reconciling actual state is less work than maintaining custom imperative scripts.
Explanation

Declarative configuration stores the intended end-state in version-controlled files, while generic controllers or reconciliation tools (e.g., Kubernetes controllers, Flux, Argo CD, Terraform) continually compare that declared state to the live system and converge the two. Because those reconcilers are maintained and battle-tested by large communities, teams avoid writing and debugging bespoke imperative scripts for every change, which lowers operational effort and risk—a key advantage highlighted in both Kubernetes object-management guidance and CNCF GitOps principles.

Why Incorrect

A. Declarative files are applied by external reconcilers, not “executed locally” for efficiency.
C. Declarative models avoid step-by-step procedural logic; dynamic scripting is an imperative trait.
D. Complex conditional code contradicts declarative philosophy; logic resides in controllers, not user configs.

References

1. Kubernetes Documentation: “Declarative object management” – Advantages section, para 2 (https://kubernetes.io/docs/concepts/overview/object-management-kubectl/overview/#declarative-configuration).

2. CNCF GitOps Working Group, “GitOps Principles” v1.0, Principle 1 (Declarative) & Principle 3 (Automatically applied), pp. 2-3.

3. HashiCorp Terraform Docs, “Why Terraform?” – Declarative Approach section, para 1-2 (docs for OSS tool in CF landscape).

4. University of Maryland CMSC848E Lecture Notes, “Infrastructure as Code & GitOps,” slides 8-10 (Spring 2022).

Scroll to Top