Bitzu

KCNA ยท Application delivery and debugging

GitOps

Git as source of truth, pull vs push delivery, drift detection, Argo CD and Flux roles.

Key points

  • GitOps keeps the desired state of the system declared in Git, which acts as the source of truth and audit trail.
  • An agent running in the cluster pulls that state and continuously reconciles the live state toward it, detecting drift when they differ.
  • Argo CD and Flux are the best known GitOps tools and are both CNCF graduated projects.
  • Changes and rollbacks are done through Git commits and reverts.

Practice questions

Single choice

What is the central idea of GitOps?

  1. The desired state is declared in Git and an agent reconciles the cluster to match it
  2. Operators run kubectl commands from laptops and record them in Git later
  3. Git replaces the container registry
  4. Every Pod is built from a Git commit at runtime
Show answer

Answer: A. The desired state is declared in Git and an agent reconciles the cluster to match it

Git holds the declared target; a controller makes reality match. Manual commands followed by documentation is the opposite of the model, and Git does not replace a registry.

Select all that apply

Which statements describe pull-based delivery?

  1. An agent inside the cluster fetches the desired state from Git
  2. The external CI system does not need cluster admin credentials to deploy
  3. The agent keeps comparing live state with declared state
  4. A CI job runs kubectl apply against the cluster from outside
  5. Deployment only happens when someone clicks a button
Show answer

Answer: A. An agent inside the cluster fetches the desired state from Git, B. The external CI system does not need cluster admin credentials to deploy, C. The agent keeps comparing live state with declared state

Pull means the cluster-side agent reaches out to Git, so credentials stay inside and drift can be watched continuously. A CI job applying from outside is the push model.

True or false

True or false: in GitOps the quickest sanctioned way to change production is kubectl edit, with Git updated afterwards.

Show answer

Answer: False

Changes go through Git first. A direct edit creates drift that the agent will report or revert.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More KCNA topics in this module