KCNA GitOps and Continuous Delivery 1 — Questions and Answers
Question 1: What is the fundamental principle of GitOps?
- Git is used as the single source of truth for declarative infrastructure and applications (Correct answer)
- Git is used only for version control of application source code
- Git is used to store encrypted secrets for Kubernetes clusters
- Git is used as a backup mechanism for Kubernetes configurations
Correct answer: Git is used as the single source of truth for declarative infrastructure and applications
GitOps uses Git as the single source of truth for declarative infrastructure and application configurations, enabling automated and auditable deployment workflows.
Question 2: Which deployment model does GitOps primarily rely on?
- Push-based deployment triggered by external CI pipelines
- Pull-based deployment where an in-cluster operator pulls changes from Git (Correct answer)
- Manual deployment performed by human operators via kubectl
- Event-driven deployment triggered by container registry webhooks only
Correct answer: Pull-based deployment where an in-cluster operator pulls changes from Git
GitOps primarily uses a pull-based model where an operator running inside the cluster continuously watches Git and pulls desired-state changes to apply them.
Question 3: What is a GitOps reconciliation loop?
- A Git merge strategy for resolving branch conflicts automatically
- A continuous process that compares actual cluster state with desired state in Git and corrects drift (Correct answer)
- A CI/CD pipeline that runs automated tests on every commit
- A scheduled backup that periodically saves live cluster state to Git
Correct answer: A continuous process that compares actual cluster state with desired state in Git and corrects drift
The reconciliation loop continuously compares the actual state of the cluster with the desired state stored in Git and automatically corrects any detected drift.
Question 4: Which of the following is a GitOps continuous delivery tool built specifically for Kubernetes?
- Jenkins
- ArgoCD (Correct answer)
- Ansible
- Terraform
Correct answer: ArgoCD
ArgoCD is a declarative GitOps continuous delivery tool for Kubernetes that monitors Git repositories and synchronizes cluster state to match the desired state defined there.
Question 5: What is 'drift' in the context of GitOps?
- When Git branches diverge after a failed merge
- When the actual cluster state differs from the desired state defined in Git (Correct answer)
- When network latency causes delays between deployments
- When container images in a registry become outdated
Correct answer: When the actual cluster state differs from the desired state defined in Git
Drift occurs when the actual running state of the cluster diverges from the desired state defined in Git, which GitOps operators detect and automatically remediate.
Question 6: What type of configuration does GitOps require applications to be expressed in?
- Imperative shell scripts stored in a CI system
- Declarative manifests stored and versioned in Git (Correct answer)
- Binary configurations stored in container image layers
- Dynamic configurations stored in relational databases
Correct answer: Declarative manifests stored and versioned in Git
GitOps requires all application and infrastructure configuration to be declarative (e.g., Kubernetes YAML manifests) so the desired state can be stored, versioned, and audited in Git.
Question 7: Which of the following is a key operational benefit of adopting GitOps?
- It eliminates the need for any version control tooling
- It provides a complete, immutable audit trail of all changes through Git commit history (Correct answer)
- It removes the requirement for CI pipelines in software delivery
- It allows direct unrestricted kubectl access to production clusters
Correct answer: It provides a complete, immutable audit trail of all changes through Git commit history
Because every change flows through Git, GitOps provides a complete audit trail — who changed what, when, and why — and makes rollbacks straightforward via Git revert.
What is the fundamental principle of GitOps?