Kubernetes and Cloud Native Associate (KCNA)Cloud Native ArchitectureMedium

A software development team is adopting a GitOps workflow for deploying their Kubernetes applications. They have configured a Git repository as the single source of truth for their application's desired state. What is the primary mechanism that ensures the cluster's actual state converges with the desired state defined in Git?

  1. AA continuous delivery pipeline triggered by code commits
  2. BAn operator or agent within the cluster continuously reconciling the states
  3. CScheduled cron jobs that periodically apply Git repository changes
  4. DManual kubectl commands issued by developers
Show answer & explanation

Correct answer: B. An operator or agent within the cluster continuously reconciling the states

In GitOps, an automated operator or agent (often called a 'reconciler') running within the Kubernetes cluster continuously monitors the Git repository for changes and applies them to the cluster, ensuring the actual state converges with the declared desired state.

Why the other options are wrong

  • A. While CD pipelines are involved, the continuous reconciliation is handled by an in-cluster agent, not just a one-time push from a pipeline.
  • C. Cron jobs are less reactive and less robust than a dedicated reconciliation agent for continuous state management.
  • D. Manual commands contradict the automation principles of GitOps.

GitOps Reconciliation

The process in GitOps where an automated agent continuously observes the desired state in Git and the actual state of the cluster, applying necessary changes to converge them.

  • Core mechanism of GitOps.
  • Performed by an in-cluster operator/agent (e.g., Flux, Argo CD).
  • Ensures desired state (in Git) matches actual state (in cluster).
  • Enables self-healing and automatic deployments.

Memory trick: GitOps uses an Octopus to pull and push, keeping states aligned.

More Cloud Native Architecture questions