Courseiva

CCNA Gitops Principles Questions

75 of 98 questions · Page 1/2 · Gitops Principles · Answers revealed

1
Multi-Selecthard

Which THREE of the following are core requirements for adopting a GitOps-based workflow?

Select 3 answers
A.Declarative infrastructure definitions in Git.
B.Proprietary hardware load balancers.
C.A cluster-side agent for reconciliation.
D.A full-time manual administrator.
E.A versioned history of state changes.
AnswersA, C, E

Essential for defining the desired state.

Why this answer

GitOps requires a declarative state in Git, an automated agent, and an immutable history.

2
Multi-Selectmedium

Which TWO of the following are core principles of GitOps?

Select 2 answers
A.Declarative desired state.
B.Using a GUI for all configuration tasks.
C.Use of imperative CLI commands.
D.Continuous drift detection and correction.
E.Manual approval for every single sync.
AnswersA, D

This is a core pillar of GitOps.

Why this answer

Declarative state and automated, continuous reconciliation are the foundational pillars of the GitOps methodology.

3
MCQeasy

Which of the following is considered an 'Anti-pattern' in a GitOps workflow?

A.Storing infrastructure definitions as code
B.Automated testing of configuration before merging to main
C.Using pull requests to review configuration changes
D.Applying 'hotfixes' directly to the cluster via kubectl
AnswerD

This creates 'configuration drift' and bypasses version control.

Why this answer

GitOps requires that the Git repository is the sole source of truth; any manual 'hotfixing' via kubectl overrides the versioned state and creates drift.

4
MCQmedium

When configuring a GitOps tool, what is the purpose of a 'webhook' in relation to the Git repository?

A.To encrypt the traffic between the cluster and Git.
B.To trigger an immediate reconciliation attempt when a push occurs.
C.To replace the need for an SSH key.
D.To store the application images.
AnswerB

This optimizes the poll interval and reduces latency.

Why this answer

Webhooks allow the Git server to notify the GitOps controller that a change has occurred, triggering an immediate sync check.

5
MCQeasy

Which of the following best describes the 'Declarative' principle in GitOps?

A.Using an interactive terminal to manage resources.
B.Providing a script to update resources.
C.Defining the target state in configuration files.
D.Requiring manual approval for every reconciliation.
AnswerC

Declarative systems define the 'what' rather than the 'how'.

Why this answer

Declarative means defining the end state of the system, rather than the sequence of commands to reach that state.

6
Multi-Selectmedium

Which TWO are common strategies for GitOps repo structure?

Select 2 answers
A.Creating one repository per single microservice.
B.Directory-per-environment.
C.Never using branches.
D.Storing all files in a single flat directory.
E.App-of-Apps pattern.
AnswersB, E

Standard for managing multi-environment configs.

Why this answer

Common strategies include 'App-of-Apps' for managing nested dependencies and 'Directory-per-Environment' for separating configurations.

7
MCQmedium

When implementing a GitOps workflow with Argo CD, what is the role of the 'AppProject' custom resource?

A.It automatically triggers infrastructure rollbacks upon failure
B.It defines the build pipeline for container images
C.It stores the Git credentials for the entire cluster
D.It enforces security boundaries and scope for a set of applications
AnswerD

AppProject controls which repositories and namespaces are accessible by specific applications.

Why this answer

The AppProject resource acts as a logical grouping for Applications, allowing administrators to restrict where they can be deployed and which resources are permitted, providing multi-tenant security.

8
MCQmedium

Why must the desired state be 'versioned' in Git in a GitOps architecture?

A.To allow the cluster to write data back to the Git repository.
B.To enable reliable rollbacks and environment reproducibility.
C.To automatically optimize cluster resource utilization.
D.To ensure developers can commit code directly to production.
AnswerB

Versioning provides a history of states that can be redeployed at any time.

Why this answer

Version control allows for easy rollbacks, audit trails, and consistent releases across environments.

9
MCQmedium

When using Argo CD, what does the 'Sync Status' 'OutOfSync' indicate?

A.The cluster is disconnected from the network.
B.A new version of the application is available in the registry.
C.The live state differs from the desired state in Git.
D.The Git repository has been deleted.
AnswerC

The controller identifies drift between the cluster and the repository.

Why this answer

It means the live state of the resources in the cluster does not match the desired state defined in the linked Git repository.

10
MCQeasy

A team is transitioning to GitOps. Which action best aligns with the principle of Declarative Desired State?

A.Running a pipeline to execute terraform apply on demand
B.Writing a bash script to update image tags on all clusters
C.Using kubectl edit to modify running pod replicas
D.Storing YAML manifests in Git representing the target environment state
AnswerD

This represents the desired state declaratively in version control.

Why this answer

Declarative configuration defines the end state, allowing tools to converge the system rather than executing imperative scripts.

11
MCQeasy

Which statement best defines 'immutable state' in the context of GitOps?

A.The cluster hardware cannot be modified.
B.The container images cannot be changed.
C.The configuration committed to Git represents a fixed, unchangeable historical point.
D.The application state cannot be deleted.
AnswerC

Immutability in Git implies that the state associated with a commit should be permanent.

Why this answer

Once a configuration is committed to Git, that specific version of the state should remain unchanged in the repository.

12
MCQhard

In a multi-cluster environment, how does the GitOps principle of 'Declarative Desired State' simplify cluster management?

A.By allowing each cluster to define its own unique state manually.
B.By requiring a human operator to verify each cluster's state daily.
C.By eliminating the need for Git altogether.
D.By enabling template-based configuration across identical environments.
AnswerD

Centralized declarations applied to multiple clusters ensure identical desired states.

Why this answer

It allows for a single source of truth that defines the state for multiple clusters, ensuring consistency across environments.

13
MCQhard

In a GitOps architecture, why is it critical that the entire state of the system is declarative?

A.To allow for faster manual scaling of pods
B.To enable the reconciliation loop to calculate the necessary deltas for convergence
C.To ensure that Docker images are automatically rebuilt
D.To replace the need for RBAC in the Kubernetes cluster
AnswerB

Convergence requires comparing the desired declaration against the live state.

Why this answer

Declarative state allows the reconciliation loop to compare the current live state against the desired state defined in code, which is essential for automated drift correction.

14
MCQeasy

A DevOps team is storing its Kubernetes manifests in a Git repository. To adhere strictly to the principle of versioned and immutable desired state in Git, how should the team manage changes to an existing deployment's container image tag?

A.Commit a change updating the image tag in the manifest file within the Git repository and merge it via a pull request.
B.Exec into the running pod using 'kubectl exec' and update the container image binary directly.
C.Run 'kubectl set image deployment/my-app my-app=image:v2' against the live cluster without updating Git.
D.Delete the deployment using 'kubectl delete' and manually re-apply a temporary local manifest file.
AnswerA

Updating the manifest in Git creates a versioned, immutable record of the state change, allowing automated reconciliation.

Why this answer

GitOps principles require that the desired state stored in Git is versioned and immutable. Modifying the manifest in Git via a new commit or pull request creates a traceable, versioned audit trail. Directly mutating live cluster resources using kubectl violates the single source of truth principle.

15
Multi-Selectmedium

When considering the GitOps principle of 'Declarative Desired State', which TWO of the following statements accurately reflect why manifests should be stored in Git?

Select 2 answers
A.To reduce the latency of image pull times
B.To serve as the single source of truth for the entire cluster configuration
C.To automatically encrypt all data in the database
D.To enable peer review and collaboration via Pull Requests
E.To allow the Git server to perform the cluster reconciliation
AnswersB, D

The Git repo must be the authoritative reference for the system state.

Why this answer

Git serves as the single source of truth for the system's state, and using a repository allows for the application of standard software development practices like Pull Requests.

16
MCQmedium

In an Argo CD deployment, a developer notices that manual changes made via kubectl are being reverted automatically. What feature is responsible for this behavior?

A.Git commit hook triggers
B.Auto-Sync with Self-Heal enabled
C.Kubernetes admission controllers
D.Manual refresh button
AnswerB

Self-heal continuously monitors drift and applies Git state.

Why this answer

Self-healing or automated reconciliation is the GitOps mechanism that restores the cluster to the state defined in Git.

17
MCQeasy

In GitOps, what is a 'Merge Request' (or Pull Request) used for?

A.To review, approve, and audit proposed changes to the desired state.
B.To bypass security checks.
C.To perform unit tests on the code.
D.To delete the cluster.
AnswerA

This creates a collaborative and secure workflow.

Why this answer

The PR/MR process acts as a gatekeeping mechanism for reviewing and approving changes before they are merged into the main branch and applied to the cluster.

18
MCQeasy

Which of these is NOT a principle of GitOps?

A.Versioned and immutable state.
B.Imperative manual updates.
C.Declarative desired state.
D.Automated reconciliation.
AnswerB

Manual, imperative updates are the opposite of GitOps principles.

Why this answer

GitOps is inherently declarative; imperative commands violate the core principle of a defined desired state.

19
MCQhard

Why is 'pull-based' reconciliation considered more secure than 'push-based' CI/CD?

A.Because the cluster initiates the connection.
B.Because it eliminates the need for Git.
C.Because Git requires passwords for every pull.
D.Because it removes the need for container images.
AnswerA

The cluster pulls from the repo, meaning no inbound ports need to be opened for the CI system.

Why this answer

Push-based systems require the CI/CD server to have cluster-admin credentials, whereas pull-based controllers use service accounts within the cluster.

20
Multi-Selectmedium

Which THREE components are typically involved in a GitOps reconciliation loop?

Select 3 answers
A.A controller running inside the cluster.
B.The Kubernetes API server.
C.A manual human approval gate for every change.
D.An external CI server that manually applies changes.
E.The Git repository containing manifests.
AnswersA, B, E

The agent performing reconciliation.

Why this answer

The loop involves the Git source, the controller, and the cluster resources.

21
MCQmedium

When syncing a Git repository to a cluster, what is the 'Sync Policy' in Argo CD?

A.It sets the password for the Git repository.
B.It configures the frequency of the container health checks.
C.It defines whether the application should be synced automatically or manually.
D.It determines which Git branch is used for the deployment.
AnswerC

This is the primary function of the sync policy.

Why this answer

The sync policy determines whether the cluster is updated automatically when drift is detected or if manual intervention is required.

22
Multi-Selecteasy

A team is reviewing their deployment practices against OpenGitOps standards. Which THREE conditions are required to satisfy the 'Declarative Desired State' and 'Versioned and Immutable State' principles?

Select 3 answers
A.The target system's desired state is expressed in a software-interpretable, declarative format like YAML or JSON.
B.The desired state is stored in a version-controlled repository that maintains an append-only change history.
C.Every state revision is uniquely identified (e.g., by a Git commit SHA) and fully reproducible.
D.Live cluster state is permitted to override repository configurations during peak traffic periods.
E.System changes are made by executing manual shell scripts directly on production control plane nodes.
AnswersA, B, C

Declarative state specification ensures that system state is defined by static declaration rather than procedural steps.

Why this answer

OpenGitOps principles state that desired state must be expressed declaratively, stored in a system that enforces versioning and immutability (like Git), and serve as the single source of truth.

23
MCQhard

Your team is using a pull-based GitOps pattern. Which component is responsible for initiating the communication to the Git repository to check for updates?

A.The developer's local kubectl client.
B.The agent running inside the Kubernetes cluster.
C.The CI/CD pipeline pushes updates to the cluster.
D.The Git server pushes changes to the cluster webhook.
AnswerB

The agent pulls the desired state, maintaining security and reducing firewall complexity.

Why this answer

In a pull-based model, the agent/controller running inside the cluster actively polls the Git repository.

24
Multi-Selectmedium

Which TWO are common pitfalls in a GitOps implementation?

Select 2 answers
A.Using Git for version control.
B.Having too many branches.
C.Allowing manual 'kubectl edit' changes.
D.Automating too many processes.
E.Committing plaintext secrets to Git.
AnswersC, E

This breaks the GitOps source of truth.

Why this answer

Common pitfalls include failing to secure credentials and relying on imperative patterns, such as manual cluster edits.

25
MCQmedium

In the context of GitOps, what is meant by 'Pull-based' architecture?

A.The cluster agent proactively pulls configurations from the repository.
B.The repository pulls changes from the cluster.
C.The cluster is pulled into the development network.
D.Developers push code to the cluster API.
E.External systems pull logs from the cluster.
AnswerA

This removes the need for the CI system to have cluster-admin privileges.

Why this answer

The controller pulls the desired state from Git, which is more secure than pushing secrets out to the cluster.

26
Multi-Selecthard

Which THREE actions occur when a GitOps controller detects drift?

Select 3 answers
A.The controller generates an alert/notification.
B.The controller automatically deletes the cluster.
C.The controller marks the resource as 'OutOfSync'.
D.The controller applies the desired state from Git to the cluster.
E.The controller pushes the manual changes back to Git.
AnswersA, C, D

Alerting is essential for maintaining visibility.

Why this answer

When drift occurs, the controller flags the resource as 'OutOfSync', alerts the relevant teams, and optionally applies the correction to restore the desired state.

27
MCQmedium

A platform team manages 50 Kubernetes clusters using GitOps. They need to ensure that an emergency rollback of an application across all clusters can be executed cleanly and audited effectively. What is the standard GitOps mechanism to achieve this rollback?

A.Execute 'helm rollback' on each individual cluster CLI in parallel.
B.Delete the target namespace in each cluster and let the API server re-download the manifest from cache.
C.Revert the bad commit in the Git repository using 'git revert' and merge the change.
D.Power down the GitOps controller pods so the clusters automatically default to their initial factory settings.
AnswerC

Reverting the commit in Git updates the target desired state declaratively, allowing automated agents across all clusters to roll back safely while preserving history.

Why this answer

In GitOps, all changes—including rollbacks—are executed by interacting with Git. Reverting the Git commit to a previous known-good state causes the GitOps controllers across all 50 clusters to reconcile to that restored desired state, maintaining a complete audit trail.

28
Multi-Selecthard

Which THREE of these are valid methods for handling configuration differences across environments (e.g., Dev vs Prod)?

Select 3 answers
A.Using separate directories for each environment's manifests.
B.Using Helm values files for different environments.
C.Manually SSHing into nodes to run sed.
D.Hardcoding every environment in one massive file.
E.Using Kustomize overlays.
AnswersA, B, E

This is a clean and common GitOps structure.

Why this answer

Effective GitOps uses tools like Helm, Kustomize, or directory separation to manage environmental differences without code duplication.

29
MCQhard

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'?

A.The state is defined as a series of execution steps rather than a static description of the target system configuration.
B.GitOps tools only support JSON files and reject any YAML or shell-based configurations.
C.Cron jobs running in Kubernetes cannot execute kubectl commands against the internal API server.
D.Imperative scripts cannot be stored in Git repositories due to file permission limitations.
AnswerA

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

Why this answer

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.

30
MCQhard

Your organization requires an audit trail of all changes to infrastructure. Why is GitOps superior to imperative 'kubectl' commands for this?

A.Kubectl allows editing the live state without record.
B.Git is faster than kubectl for large clusters.
C.The cluster automatically emails admins when kubectl is used.
D.Git provides a permanent, immutable, and auditable history of who made what change and when.
AnswerD

Git's log and commit history satisfy strict compliance and auditing requirements.

Why this answer

Git provides a cryptographically signed, timestamped, and versioned history of all changes, which is ideal for auditing.

31
Multi-Selecthard

Which THREE activities are part of the 'Automated Pull-Based Reconciliation' process?

Select 3 answers
A.Applying updates to the cluster API.
B.Sending a push notification to developers.
C.Downloading updated manifest files.
D.Polling the Git repository for changes.
E.Compiling binaries on the local cluster node.
AnswersA, C, D

Executing the reconciliation.

Why this answer

The process involves detecting changes, fetching manifests, and applying them.

32
Multi-Selecthard

Which TWO scenarios represent 'drift' in a GitOps environment?

Select 2 answers
A.A developer manually modifies a Service load balancer IP.
B.A cluster administrator adds an annotation to a Pod using kubectl.
C.A developer submits a valid Pull Request.
D.The controller logs an error about connectivity.
E.The GitOps controller successfully updates a deployment.
AnswersA, B

This is a direct, manual change that drifts from Git.

Why this answer

Drift occurs when the cluster state deviates from the version-controlled Git state.

33
Multi-Selectmedium

Which TWO of the following are primary benefits of storing the entire desired state of a system in a versioned Git repository?

Select 2 answers
A.Comprehensive audit trail of all configuration changes
B.Automatic hardware repair
C.Simplified recovery to a previous known-good state
D.High-availability of the Git server
E.Automatic scaling of cluster nodes
AnswersA, C

Git commit history serves as an immutable audit log.

Why this answer

Version control provides a clear audit trail of who changed what, and enables easy restoration to a previous known-good state.

34
MCQmedium

What is the primary function of a 'GitOps Pipeline' versus a 'GitOps Controller'?

A.The pipeline manages the Git state directly.
B.They are the same thing.
C.The controller builds the images.
D.The pipeline prepares the artifacts, while the controller reconciles the state.
AnswerD

This division of labor is a hallmark of robust GitOps.

Why this answer

The pipeline handles the CI (build/test/publish) process, while the controller handles the CD (pull/reconcile) process.

35
Multi-Selectmedium

Which TWO items are typically included in a GitOps repository?

Select 2 answers
A.User password lists.
B.Kustomize overlays or Helm charts.
C.Database backups.
D.Kubernetes manifest files.
E.Application source code.
AnswersB, D

These are standard for managing configuration variations.

Why this answer

A GitOps repository contains the declarative definitions of the infrastructure (Kubernetes manifests) and the configuration required to manage them.

36
MCQmedium

In a GitOps workflow, where does the 'source of truth' reside?

A.In the Git repository.
B.In the application's environment variables.
C.In the Kubernetes etcd database.
D.In the developer's local workstation.
AnswerA

Git serves as the immutable source of truth for the desired configuration.

Why this answer

The Git repository holds the declarative state that the cluster must match.

37
MCQhard

During an audit, an organization discovers that a secret was accidentally committed to a Git repository managed by Flux. An engineer deletes the commit containing the secret using 'git push --force' with a rewritten history. Why is this action problematic in a production GitOps environment?

A.Force-pushing history breaks the cryptographic chain of custody and can desynchronize agents expecting immutable, append-only history.
B.Kubernetes secrets created before the force-push are automatically converted into ConfigMaps by the API server.
C.Flux automatically restores deleted Git commits by fetching missing objects from the live cluster memory.
D.Git repositories permanently reject future commits if a force-push is detected by the GitOps operator.
AnswerA

GitOps relies on Git as an append-only, immutable audit log. Rewriting history disrupts reconciler tracking and undermines auditability.

Why this answer

Rewriting Git history invalidates the audit log and can cause synchronization issues or unexpected behaviors across distributed reconcilers that rely on immutable commit SHAs. In GitOps, secrets should be removed properly (e.g., using secret management tools like Sealed Secrets or SOPS) and rotated immediately rather than altering historical commits.

38
Multi-Selectmedium

Which TWO of the following are considered advantages of the GitOps approach?

Select 2 answers
A.Increased reliance on manual CLI interventions.
B.Automatic creation of new business requirements.
C.Improved auditability through version-controlled commits.
D.Simplified rollback of infrastructure configurations.
E.Ability to bypass security protocols.
AnswersC, D

Every change is documented and linked to a commit/user.

Why this answer

GitOps improves auditability through Git logs and reduces the risk of manual configuration errors.

39
Multi-Selecthard

Which THREE factors should be considered when choosing a GitOps controller?

Select 3 answers
A.The color scheme of the controller's UI.
B.The controller's support for multi-cluster deployments.
C.Whether it uses a proprietary language.
D.Compatibility with existing CI/CD pipelines.
E.Built-in integration or compatibility with secret management solutions.
AnswersB, D, E

Crucial for scaling infrastructure.

Why this answer

Key considerations include support for multi-cluster environments, secret management capabilities, and how well it integrates with existing CI tools.

40
MCQmedium

Your team is using Flux CD to manage Kubernetes resources. You notice that the application status is 'Suspended'. What is the most likely reason for this state in the context of GitOps principles?

A.The cluster is out of memory
B.A user explicitly set the suspend field to true in the resource manifest
C.The controller is unable to connect to the container registry
D.The Git repository contains syntax errors
AnswerB

Setting 'suspend: true' is a deliberate configuration to pause reconciliation.

Why this answer

Suspending a Kustomization or HelmRelease in Flux stops the reconciliation process, meaning the controller will no longer apply changes from Git to the cluster.

41
MCQmedium

Why should you avoid using 'latest' as a container image tag in GitOps?

A.It prevents the controller from knowing exactly what version is deployed.
B.It causes the cluster to crash.
C.It's slower to pull.
D.It requires more storage space.
AnswerA

Deterministic state is a GitOps requirement.

Why this answer

Using 'latest' makes the deployment non-deterministic because the image associated with the tag can change, making it impossible to know exactly what is running in the cluster.

42
Multi-Selecthard

Which THREE items should be excluded from a GitOps repository?

Select 3 answers
A.Container images (binaries).
B.Plaintext passwords/API keys.
C.Ephemeral cache files.
D.Rendered Kubernetes YAML.
E.Documentation files.
AnswersA, B, C

Store these in a registry.

Why this answer

GitOps repositories should focus on declarative config, not binary build artifacts, secrets, or transient runtime information.

43
Multi-Selectmedium

Which TWO aspects of GitOps help ensure 'Continuous Drift Detection'?

Select 2 answers
A.Daily manual audit reports.
B.Forcing all developers to use SSH.
C.Comparing live state with the desired state in Git.
D.Regular polling or event-based monitoring of cluster state.
E.Using a database to store current cluster state.
AnswersC, D

This comparison defines the drift detection process.

Why this answer

Drift detection relies on comparing the live state against the repository state and alerting on discrepancies.

44
MCQmedium

What is the purpose of 'Image Tagging' in a GitOps workflow?

A.To force the container to restart.
B.To ensure that the exact version of the application is deployed consistently.
C.To track how many users are logged in.
D.To allow the container registry to delete old images.
AnswerB

Immutability requires referencing exact versions.

Why this answer

Using specific image tags (e.g., SHA-based, not 'latest') ensures that the deployment remains deterministic and immutable.

45
MCQeasy

Which of these is a typical 'Desired State' artifact in GitOps?

A.An audit log from the cluster.
B.A shell script that installs software.
C.A live running container.
D.A Kubernetes YAML manifest.
AnswerD

YAML manifests define the expected state of the cluster.

Why this answer

Kubernetes manifest files, Helm charts, or Kustomize templates are the standard ways to define declarative state.

46
MCQhard

What is the primary risk of a 'Push-based' deployment model compared to 'Pull-based'?

A.The Git repository is too big.
B.It requires the CI system to have broad permissions on the cluster.
C.It's too slow.
D.It makes it impossible to use Git.
AnswerB

This creates a 'God-mode' credential issue.

Why this answer

Push-based models require the CI system to have cluster-admin credentials, creating a significant security vulnerability if the CI system is compromised.

47
MCQeasy

What is the primary function of the 'reconciliation loop' in GitOps?

A.To continuously compare actual state with Git and correct discrepancies.
B.To manage user access control for the cluster.
C.To compile source code into container images.
D.To update the documentation in the Git repository.
AnswerA

This is the core definition of the GitOps reconciliation loop.

Why this answer

The reconciliation loop ensures that the current cluster state matches the desired state defined in Git.

48
MCQhard

If a GitOps controller detects that an image tag has been changed in the cluster but not in Git, what does the controller do?

A.Leaves the cluster in the new state.
B.Updates the Git repository with the new image tag.
C.Reverts the cluster state to match the Git repository.
D.Prompts the user for approval.
AnswerC

Continuous drift correction ensures the live state returns to the desired state.

Why this answer

The controller identifies this as drift and uses the Git source of truth to revert the image tag back to the version declared in Git.

49
MCQmedium

How does GitOps help with disaster recovery?

A.It prevents the disaster from happening in the first place.
B.It automatically buys new hardware.
C.It keeps a copy of your data in the Git repo.
D.You can restore the entire cluster state by pointing a new cluster to the Git repository.
AnswerD

This is the essence of 'reproducible infrastructure'.

Why this answer

Because the entire cluster state is defined in Git, you can simply point a new cluster to the repository to recreate the environment.

50
Multi-Selecthard

Which THREE of the following are essential components of an effective GitOps 'Continuous Drift Detection and Correction' strategy?

Select 3 answers
A.Continuous comparison loop between cluster live state and Git desired state
B.Alerting or automated synchronization when drift is detected
C.Strict access control to prevent manual changes to the cluster
D.Regular manual audits of the cluster state
E.Using a CI-based push pipeline to update the cluster
AnswersA, B, C

Reconciliation is the engine of drift detection.

Why this answer

Drift detection requires a continuous comparison (reconciliation) between Git and the live cluster, alerting on differences, and optionally auto-remediating them.

51
MCQeasy

Which of these is a valid 'GitOps' approach for multi-environment management?

A.Using separate directories or branches for different environments (e.g., /overlays/prod).
B.Ignoring environments and deploying everything to one namespace.
C.Using a single folder for all environments and using a script to toggle them.
D.Deploying directly to production using kubectl.
AnswerA

This is the standard, clean pattern for multi-environment GitOps.

Why this answer

Using different folders or branches for environment-specific configurations allows for clear separation and controlled deployments.

52
MCQmedium

An organization uses Argo CD to manage Kubernetes clusters. A developer manually modifies a Deployment's replica count via kubectl. Which mechanism in Argo CD ensures this manual change is identified as non-compliant with the GitOps repository?

A.Git repository webhook
B.Kubernetes admission controllers
C.Kubernetes Garbage Collector
D.Argo CD Application Controller's reconciliation loop
AnswerD

The Argo CD controller continuously polls the cluster and Git to detect drift.

Why this answer

Argo CD continuously compares the live state of the cluster with the desired state defined in Git. When a discrepancy is detected, it reports the status as 'OutOfSync', performing drift detection.

53
MCQmedium

You are using Argo CD. A developer manually scales a Deployment replica count using 'kubectl scale'. What happens next in a standard GitOps implementation?

A.Argo CD sends an alert but does not revert the change.
B.The controller updates Git to reflect the new replica count.
C.The controller detects the drift and overwrites the manual change to match Git.
D.The change persists until the next Git commit.
AnswerC

This is the core behavior of automated drift correction.

Why this answer

The GitOps controller detects a mismatch between the live state and the Git-defined desired state and automatically reverts it.

54
MCQmedium

A developer pushes a change to Git, but the cluster does not update. Which log source is most effective for debugging the pull-based mechanism?

A.The browser console of the user.
B.The logs of the GitOps controller (e.g., Argo CD repo-server or Flux controller).
C.The application's logs inside the pod.
D.The Git provider's audit logs.
AnswerB

The controller is responsible for pulling the state and applying it.

Why this answer

The controller logs contain information about the reconciliation process, including authentication or parsing errors.

55
MCQeasy

What is the primary role of an 'Immutable' state in a GitOps repository?

A.To increase the storage capacity of the cluster.
B.To allow the cluster to delete resources at will.
C.To force developers to use a specific IDE.
D.To ensure that historical configurations can be reliably rolled back.
AnswerD

Immutability is key to reproducible environments and quick recovery.

Why this answer

Immutability ensures that once a state is recorded, it cannot be tampered with, and historical states are reproducible.

56
MCQmedium

Why does GitOps encourage the use of small, frequent commits?

A.To force developers to spend more time on documentation.
B.To ensure the Git server doesn't crash.
C.To minimize the size of the Git repository.
D.To reduce the blast radius and simplify troubleshooting.
AnswerD

This is a standard DevOps and GitOps practice for risk reduction.

Why this answer

Small commits make it easier to identify the cause of failures, simplify rollbacks, and reduce the risk of large-scale outages.

57
MCQmedium

An organization is migrating to GitOps using Argo CD. During an audit, you notice that manual changes made directly to the Kubernetes cluster via kubectl are being reverted within minutes. Which component of the GitOps pipeline is performing this action?

A.The cluster ingress controller
B.The Argo CD API server
C.The Git webhook listener
D.The Application Controller
AnswerD

The Application Controller is responsible for the continuous reconciliation loop that detects and corrects drift.

Why this answer

The Application Controller in Argo CD continuously monitors the live state and compares it against the declared state in Git, initiating a sync to fix drift.

58
MCQmedium

When should you use Kustomize in a GitOps workflow?

A.To build container images.
B.To manage environment-specific overrides in a declarative way.
C.To delete all namespaces.
D.To perform load testing on the cluster.
AnswerB

Kustomize allows for 'base' and 'overlay' patterns perfectly suited for GitOps.

Why this answer

Kustomize is excellent for managing environment-specific configurations without duplicating base manifests.

59
MCQeasy

Which of the following is a primary benefit of using a GitOps pull-based model over a push-based CI/CD model?

A.Automatic code compilation within the cluster.
B.Removal of the need for external access to cluster credentials.
C.Support for imperative commands.
D.Faster deployment velocity.
AnswerB

The cluster controller pulls from Git, so credentials stay within the cluster boundary.

Why this answer

Pull-based models increase security by eliminating the need to expose cluster credentials to external CI/CD pipelines.

60
MCQmedium

You are implementing a GitOps workflow where the desired state is stored in a private repository. The Argo CD controller requires access to this repository. What is the most secure GitOps-compliant way to provide this access?

A.Grant the cluster node broad read access to all public repositories.
B.Use an environment variable in the Argo CD container deployment manifest.
C.Create a Kubernetes Secret containing the SSH key and reference it in the repository configuration.
D.Hardcode the credentials in the Application manifest.
AnswerC

This method follows the principle of least privilege and keeps credentials out of source control.

Why this answer

Using a Kubernetes Secret to store repository credentials allows for secure, native integration with the Argo CD controller.

61
MCQeasy

What is the primary role of the 'Git' repository in the GitOps cycle?

A.To monitor the health of the nodes.
B.To manage user identities.
C.To store container binary files.
D.To be the single source of truth for the desired system state.
AnswerD

Every change must be in Git to be reflected in the cluster.

Why this answer

It serves as the single source of truth for the entire cluster configuration.

62
Multi-Selecthard

Which THREE features of Kubernetes are commonly used to support GitOps?

Select 3 answers
A.The Kubernetes API for resource management.
B.Node labels for scheduling.
C.Namespaces for configuration isolation.
D.RBAC for restricting access.
E.The cluster's internal clock synchronization.
AnswersA, C, D

The mechanism for applying state.

Why this answer

GitOps relies on the Kubernetes API, Namespaces for isolation, and RBAC to secure the controller's access.

63
MCQeasy

Which of these is the most suitable tool to use as the 'Git' component of GitOps?

A.A standard Git repository (e.g., GitHub, GitLab).
B.A container registry.
C.A local text file on the cluster nodes.
D.A relational database.
AnswerA

Git's branching, merging, and history are fundamental to GitOps.

Why this answer

Any standard Git-compatible server like GitHub, GitLab, or Bitbucket provides the necessary features for GitOps.

64
MCQhard

You are configuring an automated GitOps pipeline. How do you prevent 'drift' from occurring due to out-of-band changes?

A.By manually disabling 'kubectl' access for all users.
B.By enabling automated self-healing in the GitOps controller.
C.By storing the state in a central database instead of Git.
D.By setting up a cron job to restart the cluster daily.
AnswerB

Self-healing forces the cluster to align with the Git-defined desired state.

Why this answer

Enabling automated self-healing (or auto-sync) in the GitOps controller ensures that any unauthorized cluster changes are automatically reverted.

65
MCQmedium

An application is failing because a developer accidentally edited a ConfigMap in the cluster directly. Which GitOps feature prevents this from recurring?

A.Role-Based Access Control (RBAC).
B.Continuous reconciliation.
C.External DNS.
D.CI/CD pipeline triggers.
AnswerB

The controller continually reconciles the cluster with Git, reverting manual changes.

Why this answer

Automated self-healing/reconciliation ensures that any direct modifications are overwritten by the Git state.

66
MCQhard

You need to ensure that no one can modify cluster resources manually. How can you implement this in a GitOps-mature organization?

A.Remove cluster-admin access from all users except the GitOps controller.
B.Install a plugin that logs all kubectl commands.
C.Add a firewall rule to block kubectl.
D.Disable the Kubernetes API server.
AnswerA

This enforces the GitOps principle that all changes must flow through Git.

Why this answer

Removing manual 'write' access is the final stage of GitOps maturity, relying on the automated controller to apply changes.

67
MCQhard

You are implementing GitOps for a legacy application. Why might this be challenging?

A.GitOps doesn't support Java applications.
B.The cluster API is too slow for legacy apps.
C.Legacy applications often lack declarative configuration files.
D.Git servers cannot store old code.
AnswerC

The effort to convert imperative installs into declarative manifests is often the biggest hurdle.

Why this answer

Legacy applications often lack declarative definitions and might require manual setup steps that are difficult to automate.

68
Multi-Selectmedium

Which TWO practices are recommended when managing Git repositories for GitOps?

Select 2 answers
A.Using directory structures to separate environmental configurations.
B.Structuring manifests logically for readability and maintenance.
C.Hardcoding all credentials in the manifest.
D.Committing direct changes to the 'main' branch.
E.Storing all environments (dev/prod) in a single file.
AnswersA, B

Organizes state for different environments.

Why this answer

Best practices include using small, focused repositories and clear directory structures for environment separation.

69
Multi-Selectmedium

An organization is implementing GitOps across its infrastructure using Kubernetes and Flux. Which TWO statements accurately describe core characteristics of the 'Automated Pull-Based Reconciliation' principle?

Select 2 answers
A.Reconciliation automatically corrects drift when actual live cluster state deviates from desired Git state.
B.The Git repository initiates an inbound SSH connection to cluster worker nodes to push manifest updates.
C.An agent deployed inside the managed cluster periodically polls the Git repository for state changes.
D.Cluster administrative credentials must be stored inside external CI system secret stores.
E.Reconciliation requires direct human approval at the terminal for every individual resource sync.
AnswersA, C

Continuous drift detection and self-healing correction are fundamental aspects of the pull-based reconciliation loop.

Why this answer

In automated pull-based reconciliation, an in-cluster agent monitors the target state in Git and compares it to live state, pulling updates without exposing external cluster inbound management ports.

70
Multi-Selectmedium

Which TWO tools are commonly associated with the 'GitOps' ecosystem?

Select 2 answers
A.Docker Desktop.
B.Nginx.
C.Prometheus.
D.Argo CD.
E.Flux.
AnswersD, E

Leading GitOps controller.

Why this answer

Argo CD and Flux are the two most prominent Kubernetes-native GitOps controllers.

71
MCQmedium

In a large enterprise, why is GitOps preferred for multi-cluster environments?

A.It enables developers to bypass security controls in dev clusters.
B.It automatically scales the nodes in all clusters.
C.It eliminates the need for any monitoring tools.
D.It allows a single source of truth to manage configuration consistency across all clusters.
AnswerD

This minimizes configuration drift and ensures standardized environments.

Why this answer

GitOps allows a single repository to define the state for multiple clusters, ensuring consistency across environments.

72
MCQeasy

A developer updates a Helm release values file in Git to change a ConfigMap key. How does the GitOps pull-based agent determine that reconciliation is necessary?

A.The container registry notifies the GitOps agent whenever a ConfigMap is altered in the source code.
B.The Kubernetes API server continuously queries the Git repository directly without using any controller.
C.The agent continuously compares the target Git repository commit SHA and state against the cluster's actual state.
D.The agent receives an SSH trigger sent manually by the developer from their workstation.
AnswerC

Continuous comparison of the desired state in Git (tracked via commit SHAs) against the observed live state drives the reconciliation loop.

Why this answer

The pull-based GitOps agent periodically polls or receives webhooks from the Git repository, comparing the target Git revision (SHA or tag) and contents against the current state stored/deployed in the cluster.

73
Multi-Selecteasy

Which THREE of the following are common GitOps tools used in the CNCF ecosystem?

Select 3 answers
A.Crossplane.
B.Flux.
C.Apache HTTP Server.
D.Argo CD.
E.MySQL.
AnswersA, B, D

Enables GitOps for infrastructure management.

Why this answer

Argo CD, Flux, and Crossplane are recognized GitOps-focused tools.

74
MCQmedium

What is the recommended way to handle secrets in GitOps?

A.Commit them directly to the repo in a private branch.
B.Use an encrypted secret operator like SealedSecrets.
C.Create them manually using kubectl.
D.Store them in base64 in Git.
AnswerB

SealedSecrets keeps the secret encrypted in Git, decryptable only in the cluster.

Why this answer

Secrets should never be stored in plaintext. Tools like SealedSecrets or HashiCorp Vault integration are standard.

75
MCQhard

In GitOps, what does 'Self-Healing' mean?

A.The cluster reboots itself if it runs out of memory.
B.The controller replaces manual changes with the state from Git.
C.The application restarts if a pod crashes.
D.The developer re-pushes the code to fix the bug.
AnswerB

This is the definition of GitOps self-healing.

Why this answer

Self-healing refers to the ability of the GitOps controller to automatically detect drift and revert the cluster to the state defined in Git.

Page 1 of 2 · 98 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Gitops Principles questions.