Cluster operationsLesson 9 of 16
Helm and GitOps
With many manifests, you must track two things separately: "what did I install together" and "is the cluster in the right state now". Helm solves the first, GitOps the second. Here we follow how a Helm release and a GitOps sync tool (for example Argo CD or Flux) keep the cluster in line.
Helm revision—
Desired state in Git—
Live cluster statenone
Sync status—
RequestWatchAppears in a later step
What you will learn
- A chart plus values becomes a release
- Upgrades and rollbacks are recorded as revisions
- A GitOps tool pulls from Git and aligns the cluster
- Drift is detected and reverted
Push vs. pull
| Aspect | Push (CI/CD pipeline deploy) | Pull (GitOps) |
|---|---|---|
| Who applies | External CI/CD tool | GitOps tool inside the cluster |
| When | Once, when a run is triggered | Continuously (periodic comparison) |
| Source of truth | The tool's deploy config and run history | Git repository |
| Reverting | Pick an earlier version from history and reapply | Revert to an earlier commit in Git and the tool follows |
| Direct edits | Stay until the next deploy | Detected as drift and may be reverted |
Try it yourself
helm list -A # Releases and their current revision
helm history <release> -n <namespace> # Revisions, rollbacks included
helm get values <release> -n <namespace> # values that filled the chart
argocd app get <app> # Argo CD: Synced or OutOfSync
argocd app diff <app> # Drift between Git and the cluster
flux get kustomizations -A # Flux: ready state and applied revision
Check yourself
Further reading: Helm docs · OpenGitOps principles · Argo CD docs · Flux docs