Paths/DevOps Engineer/Platform Engineering / GitOps with ArgoCD
Declare a GitOps Application
GitOps means the cluster syncs itself from Git. Write the ArgoCD Application manifest that tells the controller to watch a repo and apply everything in it.
Validator
IDLE — checks run live as you type commands; submit when done
01Requirements
live checks- File ~/gitops/app.yaml exists○
- It declares an argoproj.io Application watching a Git repo○
02Walkthrough
4 steps- 01
Create the gitops directory
In real setups this manifest lives in a dedicated config repository that ArgoCD itself watches.
mkdir ~/gitops - 02
Write the Application manifest
source.repoURL is the Git repo to sync FROM; destination is the cluster and namespace to sync TO; syncPolicy automated means no human clicks.
echo 'apiVersion: argoproj.io/v1alpha1\nkind: Application\nmetadata:\n name: service-template\nspec:\n source:\n repoURL: https://github.com/learner/service-template.git\n targetRevision: main\n destination:\n server: https://kubernetes.default.svc\n namespace: default\n syncPolicy:\n automated: {}' > ~/gitops/app.yaml - 03
Understand the drift loop
From now on: someone edits the repo, ArgoCD notices, the cluster changes. Nobody kubectl-applies by hand — that's the whole GitOps idea.
- 04
Verify and submit
cat the manifest, then submit.
cat ~/gitops/app.yaml
03Stuck?
0 of 3 revealedTake a hint without losing the lab — each one points at the thing to look at, not at the answer.
04AI Tutor
guides, never solvesTell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?
04Notebook
saved locally in this browserlearner@lab — ubuntu:24.04
Session is disposable
↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list