Argo CD: Git as the Source of Truth for Kubernetes
Argo CD makes your Git repo the single source of truth for your Kubernetes cluster's state. It constantly monitors your cluster and compares it to your desired state in Git, flagging any differences.
Why it exists
Managing Kubernetes manifests manually across different environments is complex and error-prone. Using kubectl apply directly offers no clear audit trail, versioning, or a single source of truth for what should be running. This makes rollbacks difficult and configuration drift between environments almost inevitable.
The mental model
Think of Argo CD as a security guard for your Kubernetes cluster. It holds a photo of what the cluster should look like (your Git repo) and constantly patrols the grounds (the live cluster). If it sees anything out of place, like a manual change made with kubectl, it raises an alarm by marking the application as "OutOfSync." It can then be configured to automatically restore the cluster to match the state in the photo.
How it works
Argo CD runs as a controller inside your Kubernetes cluster. You define an "Application" custom resource that tells Argo CD two things: where your configuration lives (a Git repository, path, and revision) and where to deploy it (a destination cluster and namespace). Argo CD then continuously fetches the latest manifests from your Git source, compares them to the live resources in the destination cluster, and reports the difference. If you enable auto-sync, it will automatically apply the changes from Git to the cluster to eliminate any drift.
When to use it
Use Argo CD when you want to adopt a GitOps workflow for Kubernetes. It is excellent for managing application deployments, ensuring environment consistency (dev, staging, prod), and providing a clear, auditable history of all changes to your cluster's state. It natively supports plain YAML manifests, Kustomize, Helm charts, and Jsonnet.
When not to use it
Argo CD is a Continuous Delivery (CD) tool, not a Continuous Integration (CI) tool. It does not build your container images or run your tests; it only deploys what's already defined in Git. For a full build-test-deploy pipeline, you must pair Argo CD with a CI system like GitHub Actions or Jenkins. Avoid it if your team is not prepared to commit to Git as the exclusive source of truth.
One canonical example
A team manages a microservice's deployment.yaml in a Git repository. To update the image tag, a developer opens a pull request to change image: my-app:v1 to image: my-app:v2. Once merged to the main branch, Argo CD detects the change, shows the application as "OutOfSync," and automatically applies the new manifest. This triggers a rolling update of the deployment in the Kubernetes cluster. The entire change is visible, auditable, and reversible in Git history.
Interview question
Which task is NOT a primary function of Argo CD in a typical GitOps workflow?
- a.Monitoring a Kubernetes cluster for deviations from a defined state
- b.Compiling application source code into deployable container imagesCorrect
- c.Providing an auditable history of changes to Kubernetes resource configurations
- d.Automatically synchronizing the live cluster state with a Git repository
Why? this is the answer
Argo CD is a Continuous Delivery (CD) tool, meaning it focuses on deploying and synchronizing existing artifacts. It is explicitly stated that it does not build container images, which is a function of Continuous Integration (CI) tools.
Just read this? Test yourself on what you have been reading.
Read the original → argo-cd.readthedocs.io
- #kubernetes
- #gitops
- #ci/cd
- #declarative
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on kubernetes — each one lists the topics its interview covers.
See open roles