DevOps

Argo CD

Argo CD is a GitOps tool for Kubernetes: it watches a Git repository and syncs the cluster to the state described there.

What it is

Argo CD is a declarative GitOps continuous delivery tool for Kubernetes. It is part of the Argo project, which has graduated status in the CNCF. The GitOps idea: Git is the source of truth for what should run in the cluster.

You create an Application pointing to a repository and a path with manifests (plain YAML, a Helm chart, Kustomize). Argo CD compares Git with the live cluster state, shows drift (OutOfSync) and can sync automatically, and can also revert manual changes (self-heal).

It has a web UI visualizing resources, multi-cluster support, rollback through Git history, RBAC and SSO.

Use it when

  • You deploy to Kubernetes and want Git as the single source of truth.
  • You need change audit and rollback through commit history.
  • You manage several clusters and environments.
  • You want to separate CI (build) from CD (deploy).

Avoid it when

  • You have no Kubernetes: Argo CD works only with it.
  • One small cluster where helm upgrade in CI is enough.

Key concepts

GitOps
An approach where the desired infrastructure state lives in Git and a tool reconciles the cluster to it.
Application
An Argo CD resource linking a Git source to a target cluster and namespace.
Sync / OutOfSync
Sync applies Git to the cluster; OutOfSync means the state has drifted.
Self-heal / prune
Automatically reverts manual changes and removes resources no longer in Git.

Example

An Application that automatically syncs the apps/web folder from Git to the cluster.

Interview questions

  1. 1. What is GitOps?

    A practice where the desired system state is described in Git and a controller in the cluster reconciles reality to it. Changes go through pull requests, so there is audit and easy rollback.

  2. 2. Why is Argo CD's pull model better than pushing from CI?

    CI needs no cluster access or secrets, because Argo CD runs inside the cluster and pulls changes itself. It is safer and reconciles continuously, not just at deploy time.

  3. 3. What do self-heal and prune do?

    Self-heal returns resources to the Git state if they were changed by hand. Prune removes resources from the cluster that disappeared from Git.

Interview questions from the bank

Logos belong to their owners and are used for identification only. Icons: Simple Icons (CC0), Devicon (MIT).