Courseiva
CGOA
Gitops PrincipleshardMultiple ChoiceObjective-mapped

CGOA Gitops Principles Practice Question

A platform engineer wants to configure an application state declaratively. They write an imperative script containing commands like 'kubectl scale deployment --replicas=5' and push this script into a Git repository for execution by a cron job. Why does this approach fail to satisfy the core GitOps principle of 'Declarative Desired State'?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The state is defined as a series of execution steps rather than a static description of the target system configuration.

Imperative scripts define 'how' to achieve a state through a sequence of steps, rather than expressing 'what' the target system should look like (declarative). Declarative state relies on static configuration documents (like YAML manifests) that express target end-states.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The state is defined as a series of execution steps rather than a static description of the target system configuration.

    Why this is correct

    Declarative state specifies the desired end-state (e.g., replicas: 5) rather than the operational actions required to get there.

  • GitOps tools only support JSON files and reject any YAML or shell-based configurations.

    Why it's wrong here

    GitOps engines widely support YAML, Helm charts, Kustomize overlays, and JSONnet, but require declarative formats rather than imperative step execution.

  • Cron jobs running in Kubernetes cannot execute kubectl commands against the internal API server.

    Why it's wrong here

    CronJobs can execute kubectl commands if bound to an appropriate ServiceAccount with RBAC rights.

  • Imperative scripts cannot be stored in Git repositories due to file permission limitations.

    Why it's wrong here

    Git can store any plain text files, including imperative shell scripts.

About these practice questions

This CGOA question is part of Courseiva's 325-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official CNCF / Linux Foundation exam blueprint

This CGOA practice question is part of Courseiva's free CNCF / Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CGOA exam.