Introduction to GitOps: Concepts, Push vs. Pull, and Argo CD Components
This post is the starting point of the GitOps series. Before configuring FluxCD, Flagger, and Argo CD in later posts, it sets out what GitOps changes and the criteria for judging it.
What is GitOps?
Section titled “What is GitOps?”GitOps is an operating model in which deployment state is described in declarative files kept in a Git repository, and a controller inside the cluster continuously closes the gap between that declaration and the actual state. When you push Kubernetes resources to Git, the cluster drifts from the repository, and the controller detects the difference and synchronizes (syncs) it.
- Git records the desired state and its change history. Commits and pull requests show who changed what and when.
- The actual deployment state comes from the controller’s sync/health status, not from Git. A merged commit does not mean the Pods are healthy.
- When rolling back to an earlier revision, you still need to verify image availability, data, and external-dependency compatibility. Reverting manifests does not revert a database schema or an external API.
The four principles
Section titled “The four principles”OpenGitOps defines GitOps with four principles.
| Principle | Meaning | What to check in operation |
|---|---|---|
| Declarative | Describe the desired result, not the procedure | No step still depends on the order of kubectl apply |
| Versioned and Immutable | Keep the desired state in a store that retains history | No direct changes (kubectl edit) happen outside that history |
| Pulled Automatically | An agent pulls declarations from the store | CI does not hold cluster credentials |
| Continuously Reconciled | The actual state is continuously observed and aligned with the desired state | Drift is detected and either corrected or alerted on |
How GitOps differs from IaC
Section titled “How GitOps differs from IaC”IaC is the broader concept. GitOps focuses on an operating model in which Git is the source and a controller continuously reconciles. In practice, a common combination is to create clusters and cloud resources with Terraform and manage the Kubernetes resources on top with GitOps.
| GitOps | IaC | |
|---|---|---|
| Main target | Kubernetes resources (mostly) | All infrastructure (local, cloud, Kubernetes) |
| Source | Git | Can use stores other than Git |
| How changes apply | A controller in the cluster pulls and reconciles | A tool applies at run time (plan/apply) |
| Typical tools | Argo CD, Flux | Terraform, Ansible, Chef, etc. |
Push-based vs. pull-based delivery
Section titled “Push-based vs. pull-based delivery”In push-based delivery, the CI pipeline builds and then deploys directly to the cluster. It is simple to set up, but CI must hold cluster credentials, and it cannot detect when someone changes resources directly after deployment.

In pull-based delivery, a GitOps controller inside the cluster watches Git and applies the differences. CI builds the image and only updates the image tag in the manifest, so cluster credentials never leave the cluster. Drift caused by direct changes also surfaces at the next reconcile.

Reconcile flow
Section titled “Reconcile flow”Argo CD components
Section titled “Argo CD components”Argo CD is the most common tool that implements this flow inside Kubernetes.
| Component | Role | Symptom when it fails |
|---|---|---|
| API Server | Handles Web UI, CLI, and API requests; applies authentication and RBAC | UI/CLI unavailable. Syncs already in progress continue in the controller |
| Repository Server | Fetches manifests from Git and renders Helm, Kustomize, and so on | ComparisonError, rendering timeouts |
| Application Controller | Compares desired and live state and determines sync and health | Status stops updating, automated sync stalls |
| Dex | Optional SSO (OIDC) broker to an external IdP | SSO login fails |
| Redis | Cache for rendered results and cluster state; holds only rebuildable data | Slower responses. After a restart the cache is rebuilt |
| Notifications Controller | Sends sync and health events to Slack, email, and so on | Missed notifications |
What to watch for when rolling back
Section titled “What to watch for when rolling back”- Git revert is the default. Reverting the desired state to an earlier commit keeps the history, and the controller converges to that state.
- You can’t use Argo CD’s rollback on an Application with automated sync enabled. Automated sync would overwrite it with the Git state again. To roll back urgently, disable automated sync, roll back, and then bring Git to the same state.
- Reverting manifests does not revert the whole system. Check that the previous image tag still exists in the registry, that database migrations are backward compatible, and that external API contracts have not changed.
Read next
Section titled “Read next”- Compare the two controllers in FluxCD Intro and ArgoCD Intro.
- GitOps Repository Structure covers combining Helm and Kustomize and the Apps-in-App pattern.