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
What is the central idea of GitOps?
- The desired state is declared in Git and an agent reconciles the cluster to match it
- Operators run kubectl commands from laptops and record them in Git later
- Git replaces the container registry
- 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.
Which statements describe pull-based delivery?
- An agent inside the cluster fetches the desired state from Git
- The external CI system does not need cluster admin credentials to deploy
- The agent keeps comparing live state with declared state
- A CI job runs kubectl apply against the cluster from outside
- 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: 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.
