Benefits of GitOps With Argo CD for ML Platform Teams
ML platforms collect components quickly: inference servers, vector databases, feature pipelines, monitoring, and several environments of each. When they're changed with manual kubectl commands, nobody knows exactly what's running. GitOps fixes that by making a Git repository the single description of every environment.
How it works
You store Kubernetes manifests or Helm values in Git. Argo CD runs in the cluster, compares the cluster with the repository and applies any differences.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: inference
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/acme/platform
path: apps/inference/prod
targetRevision: main
destination:
server: https://kubernetes.default.svc
namespace: inference
syncPolicy:
automated:
prune: true
selfHeal: true
Benefit 1: A full history of changes
Every change to a model server version, replica count or setting is a commit with an author and a review. When something breaks, git log shows what changed.
Benefit 2: Rollback by reverting a commit
Reverting the commit returns the environment to its previous state, and Argo CD applies it automatically.
Benefit 3: Drift gets corrected
With self-heal on, manual changes made directly in the cluster are reverted to what Git says. Emergency fixes can't quietly become permanent.
Benefit 4: Consistent environments
Staging and production can share base manifests with small overlays. Promotion becomes a pull request that changes a version in the production folder.
Benefit 5: Fewer cluster credentials
CI pipelines no longer need permission to change the cluster. They update the repository, and Argo CD applies the change from inside.
Benefit 6: A clear view of what's running
The Argo CD interface shows which applications are in sync, which are degraded and exactly how the cluster differs from Git. During an incident, that answers the first question everyone asks: what is actually running right now?
When it's more trouble than it's worth
- Very small setups. One cluster with three deployments may not justify another system to run.
- Secrets. Plain secrets must never go into Git, so you'll also need External Secrets Operator or Sealed Secrets.
- Values that change constantly. Tell Argo CD to ignore replica counts managed by an autoscaler, or the two will fight.
Move one non-critical application to GitOps first, and bring the others over once the team is comfortable.