Courseiva

CCNA Gitops Principles Questions

23 of 98 questions · Page 2/2 · Gitops Principles · Answers revealed

76
Multi-Selecthard

Which THREE mechanisms can be used to notify a GitOps controller of a change in Git?

Select 3 answers
A.SSH-based push from the local machine.
B.Git repository webhooks.
C.Manual refresh request via CLI/UI.
D.Periodic polling of the Git repository.
E.Waiting for a container crash.
AnswersB, C, D

Efficient, event-driven notification.

Why this answer

Controllers can detect changes via polling (continuous), webhooks (event-driven), or manual sync requests.

77
MCQhard

You are debugging a GitOps deployment. The controller shows 'OutOfSync' but the cluster seems to be running correctly. What is the most likely cause?

A.The network latency to the Git server is too high.
B.Manual changes were made to the live resource that weren't captured in Git.
C.The Git repository is empty.
D.The controller is broken.
AnswerB

This is the classic definition of configuration drift in GitOps.

Why this answer

An 'OutOfSync' status indicates that the actual cluster configuration deviates from the declarative state defined in Git.

78
Multi-Selecthard

Which THREE are standard ways to implement GitOps with Helm?

Select 3 answers
A.Running 'helm upgrade' manually.
B.Only storing the chart source code.
C.Using a GitOps operator to trigger 'helm install'.
D.Storing the final rendered YAML in Git.
E.Storing Helm values files in Git.
AnswersC, D, E

Modern GitOps tools integrate this natively.

Why this answer

Helm can be used by packaging charts in Git, using a GitOps operator to render templates, or by storing values files in Git.

79
MCQmedium

An administrator notices that an engineer manually modified a Service loadBalancerIP in the Kubernetes live cluster using 'kubectl edit'. The cluster is managed by an automated GitOps engine configured in a pull-based model. What will happen during the next reconciliation cycle?

A.The GitOps engine will automatically commit the updated loadBalancerIP back to the Git repository to keep Git in sync.
B.The live cluster modification will block future Git commits from being fetched by the GitOps agent.
C.The GitOps engine will detect the drift and overwrite the live cluster state to match the declared state in Git.
D.The GitOps engine will halt reconciliation permanently until an administrator manually clears the cluster error log.
AnswerC

Continuous drift correction enforces the state in Git over any out-of-band manual changes made to the cluster.

Why this answer

In a pull-based GitOps pattern, an agent running inside the cluster continuously monitors both the declared state in Git and the actual state in the cluster. When drift is detected, the controller overwrites the live state with the desired state defined in Git.

80
MCQeasy

Which of the following is NOT a benefit of the GitOps model?

A.Increased system performance.
B.Improved auditability.
C.Faster recovery from disasters.
D.Standardized deployment processes.
AnswerA

GitOps improves consistency and manageability, not raw compute performance.

Why this answer

GitOps does not necessarily increase the performance of the underlying application; it focuses on deployment and configuration consistency.

81
MCQhard

What is a 'GitOps Operator'?

A.A software agent that monitors Git and the cluster to maintain state alignment.
B.A tool that converts YAML to JSON.
C.A database that stores configuration history.
D.A human user who manually pushes Git commits.
AnswerA

The operator is the heart of the GitOps pull-based loop.

Why this answer

An operator is a Kubernetes controller that implements a control loop to continuously reconcile the cluster with the desired state in Git.

82
MCQeasy

What is the relationship between the 'desired state' and the 'actual state' in GitOps?

A.The controller continuously reconciles the actual state to the desired state.
B.The desired state is defined by the actual state.
C.The desired state is enforced by the controller to match the actual state.
D.The actual state is manually pushed to the desired state.
AnswerA

Reconciliation bridges the gap between the two states.

Why this answer

The goal of GitOps is to make the actual state equal to the desired state.

83
Multi-Selectmedium

Which TWO of the following are primary benefits of storing immutable state in Git?

Select 2 answers
A.Reduction in manual cluster configuration errors
B.Faster deployment of hotfixes directly to production
C.Automated conversion of Docker images to YAML
D.Ability to audit all environment changes through commit history
E.Increased server-side storage capacity
AnswersA, D

Declarative files in Git replace manual, error-prone configurations.

Why this answer

Immutability and versioning provide a clear audit trail and reliable rollback mechanisms.

84
Multi-Selectmedium

Which TWO are examples of 'Drift' in a GitOps environment?

Select 2 answers
A.A temporary spike in CPU usage.
B.A manual update to a Deployment image via kubectl.
C.A container crashing due to a code bug.
D.A new Git commit.
E.Changing a Service type directly in the cluster.
AnswersB, E

This is classic configuration drift.

Why this answer

Drift is any change to the cluster state that is not reflected in the Git repository.

85
Multi-Selecthard

A senior cloud architect is designing a multi-tenant platform using GitOps. They want to ensure that continuous drift detection and correction operate reliably without causing system instability. Which TWO practices help mitigate risks associated with automated continuous drift correction?

Select 2 answers
A.Granting full cluster-admin permissions to all application developers so they can manually disable drift correction during deployments.
B.Disabling Git versioning so that drift detection compares live state against an unversioned NFS network share.
C.Configuring the GitOps controller to ignore specific dynamic fields updated by in-cluster controllers, such as 'spec.replicas' managed by a HorizontalPodAutoscaler (HPA).
D.Setting the reconciliation loop interval to run once every 30 seconds while forcing a full cluster node reboot on every iteration.
E.Utilizing dry-run or diff-matching alerts to notify teams of unexpected drift before automated self-healing applies destructive changes to critical resources.
AnswersC, E

Ignoring fields modified by cluster operators prevents continuous reconciliation loops between the GitOps engine and live cluster controllers.

Why this answer

Automated drift correction can cause feedback loops or resource exhaustion if external mutations (like auto-scalers modifying replica counts or controllers adding status annotations) conflict with Git. Ignoring dynamic runtime fields or using structured sync windows mitigates these risks.

86
MCQhard

You are implementing a GitOps pipeline for a complex microservices architecture. To satisfy the principle of 'versioned and immutable state', how should you handle environment-specific configurations while maintaining a single source of truth?

A.Use Kustomize overlays to manage environment-specific patches stored in the same repository
B.Use a CI pipeline to inject environment variables into the cluster via API calls
C.Execute helm install --set commands during the deployment phase
D.Maintain separate Git repositories for every environment
AnswerA

Kustomize allows for a declarative, versioned approach to managing variants while keeping a single source of truth.

Why this answer

Using Kustomize bases and overlays allows for a single declarative base while versioning environment-specific patches separately in Git, maintaining immutability.

87
MCQmedium

In a GitOps environment, an engineer manually deletes a Deployment via 'kubectl'. What should happen next to maintain the desired state?

A.The controller detects the drift and automatically restores the Deployment.
B.The controller ignores the change until the next git commit.
C.The system issues an alert but does not modify the cluster.
D.The manual deletion is permanently synced to the Git repository.
AnswerA

Drift detection and automated correction is a core GitOps principle.

Why this answer

The GitOps controller, such as Argo CD or Flux, performs continuous reconciliation to ensure the cluster state matches the Git repository.

88
MCQhard

You are troubleshooting a Flux controller that is not reconciling changes. The Git repository is updated, but the cluster remains unchanged. Which component should you inspect first to verify the 'automated pull-based reconciliation'?

A.The Kubernetes API server logs.
B.The 'flux-system' namespace's 'kustomization.yaml' file.
C.The Git provider's webhook logs.
D.The 'GitRepository' or 'Kustomization' custom resources.
AnswerD

These resources define the source and the reconciliation loop for the specific application.

Why this answer

The Kustomization or HelmRelease custom resource defines the link between the repository and the reconciliation loop.

89
MCQeasy

Which of the following actions best aligns with the GitOps principle of 'Automated Pull-Based Reconciliation'?

A.A developer manually running Helm upgrade in the production environment
B.Using a Git hook to trigger an SSH deployment script on a remote server
C.Jenkins triggers a 'kubectl apply' command to push changes from the CI server
D.A cluster-resident controller actively pulling manifests from a Git repository
AnswerD

This describes the pull-based model central to GitOps.

Why this answer

Pull-based reconciliation involves an agent running inside the cluster that actively fetches the desired state from Git, rather than a CI system pushing changes.

90
MCQmedium

What is the primary advantage of storing Kubernetes manifests in a version-controlled repository?

A.It makes the container images run faster.
B.It automatically patches security vulnerabilities.
C.It provides a backup in case the cluster is deleted.
D.It allows developers to bypass the CI/CD system.
AnswerC

The repository serves as a disaster recovery point for the cluster configuration.

Why this answer

Version control allows for tracking changes, reverting to previous states, and providing a historical audit log.

91
MCQmedium

A company is choosing between a push-based CI/CD pipeline (e.g., executing 'kubectl apply' from GitHub Actions) and a pull-based GitOps controller (e.g., Argo CD or Flux). Which security advantage is uniquely provided by adopting the pull-based architecture?

A.Git repositories are automatically encrypted at rest using cluster-managed hardware security modules.
B.It eliminates the need to perform code reviews or pull request approvals before deploying to production.
C.Cluster API credentials do not need to be exposed or stored inside the external CI/CD platform.
D.Container images are automatically scanned for vulnerabilities before being pushed to the container registry.
AnswerC

Because the operator runs inside the target cluster, it pulls manifests internally without requiring external CI runners to hold cluster kubeconfig credentials.

Why this answer

Pull-based reconciliation uses an agent running inside the cluster that reaches out to Git. This eliminates the need to expose cluster API endpoints to external network callers or store cluster admin credentials in external CI systems.

92
MCQhard

What happens when you delete an application from the Argo CD dashboard without deleting the Git repository?

A.The Git repository is automatically updated.
B.The cluster is wiped completely.
C.The controller re-syncs and restores the application.
D.Nothing happens.
AnswerC

The controller's job is to enforce the Git state; as long as the Git state exists, the controller will recreate the app.

Why this answer

The application is removed from Argo CD, but if the controller is still configured to watch that repository, it may re-create the application unless the removal is also reflected in Git.

93
MCQmedium

When utilizing Git as the 'Source of Truth' for a cluster, what happens if the cluster state diverges from Git?

A.The controller alerts the administrator but takes no action.
B.The Git repository is updated to reflect the new cluster state.
C.The controller detects the drift and reports it as out-of-sync.
D.The cluster ignores the Git repository until a new commit is pushed.
AnswerC

Identifying 'Out-of-Sync' status is the first step in reconciliation.

Why this answer

Drift detection allows the GitOps controller to identify when the cluster state has deviated from the declared Git state.

94
Multi-Selecthard

Which THREE components are essential for a robust pull-based GitOps deployment?

Select 3 answers
A.A Git repository hosting declarative manifests.
B.A Kubernetes cluster to host the applications.
C.A GitOps controller (e.g., Argo CD or Flux).
D.A continuous integration server with cluster-admin access.
E.A dedicated database for storing cluster state.
AnswersA, B, C

The repository is the source of truth.

Why this answer

A robust system requires the controller (the brain), a Git source (the truth), and a cluster (the execution environment).

95
MCQmedium

When defining a declarative desired state in Kubernetes, which attribute is essential to satisfy the 'declarative' principle?

A.A shell script that executes 'kubectl apply'.
B.A webhook that triggers an update process.
C.A YAML manifest describing the final resource configuration.
D.A manual 'kubectl edit' command.
AnswerC

Declarative systems focus on the target state, represented by static configuration.

Why this answer

The manifest should define the final state, not the steps taken to achieve it.

96
Multi-Selectmedium

Which TWO benefits does GitOps provide for team collaboration?

Select 2 answers
A.Removing the need for communication.
B.Forcing everyone to use the same IDE.
C.Providing a transparent, versioned history of infrastructure changes.
D.Allowing developers to deploy without oversight.
E.Enabling peer review of all changes via Merge Requests.
AnswersC, E

This makes communication much easier.

Why this answer

GitOps fosters collaboration by leveraging pull requests for peer reviews and providing a single, transparent record of all changes.

97
Multi-Selecthard

Which THREE principles are foundational to the GitOps model as defined by the CNCF GitOps Working Group?

Select 3 answers
A.Manual approval is required for all production deployments
B.Software must be delivered using push-based CI/CD pipelines
C.Changes must be automatically pulled and applied
D.The state must be versioned and immutable
E.The system must be defined declaratively
AnswersC, D, E

Automated reconciliation is required to maintain the desired state.

Why this answer

The principles include Declarative state, Versioned/Immutable storage, and Automated reconciliation.

98
Multi-Selectmedium

Which TWO characteristics help ensure a GitOps repository is auditable?

Select 2 answers
A.Only allowing the admin user to push code.
B.Use of private email addresses in commit logs.
C.Cryptographically signed commits to verify authorship.
D.Detailed commit logs showing the author and time of change.
E.Storing all files as binary blobs.
AnswersC, D

This guarantees the integrity of the commit history.

Why this answer

Auditable GitOps relies on commit history (who made the change) and cryptographic signing of commits (verifying the origin of the change).

← PreviousPage 2 of 2 · 98 questions total

Ready to test yourself?

Try a timed practice session using only Gitops Principles questions.