๐ค Learn ArgoCD the school way โ with & without GitOps
The sister course to
Learn Kubernetes School :
that one teaches what runs your app โ this one teaches what deploys it and keeps it
honest . You deploy the same demo app three ways โ by hand, with a CI/CD push pipeline,
and with ArgoCD โ and feel exactly why each step up exists.
๐ by hand ๐ฎ CI/CD push
๐ GitOps ๐ค ArgoCD pull
๐ชโฉ๏ธ self-heal โช git-revert rollbacks
๐ช Part 1 โ WITHOUT ArgoCD
deploy by hand โ and forget what you deployed
meet configuration drift , the silent killer
automate with a push pipeline (courier robot ๐ฎ)
โฆand discover what push still can't fix
๐ Part 2 โ WITH ArgoCD
git becomes the single source of truth
the caretaker robot ๐ค lives inside the cluster
drift gets reverted; deploys = commits
rollback = git revert ยท audit = git log
๐บ๏ธ The big picture โ one diagram, both worlds
The whole course on one canvas: the PUSH world (red, lessons 1โ4) with its four gaps,
and the PULL world (green, lessons 5โ12) with its six wins. Click it for the
4K version โ great as a wallpaper-sized reference.
๐ช Part 1 โ WITHOUT ArgoCD (lessons 1โ4)
Feel the pain first: hand deploys, invisible drift, then a courier robot (CI/CD push) โ
and the four gaps it can never close. One git branch = one idea; branch 07 contains lessons 01โ07.
๐ Part 2 โ WITH ArgoCD (lessons 5โ12)
The cure: git becomes the master plan book, and ArgoCD โ the caretaker robot living
INSIDE the cluster โ keeps reality matching it, forever.
# take the course locally (any local cluster โ Docker Desktop, minikube, kind):
git clone https://github.com/BaluRaut/learn-argocd-school.git
cd learn-argocd-school
git checkout lesson-01-deploy-by-hand # then open lessons/01-deploy-by-hand/README.md
๐ The lesson diagrams โ follow the numbers
Every lesson as one numbered box-and-arrow diagram, one after another โ
readable right here (red = without ArgoCD, green = with). Also on a
standalone page with jump navigation.
1 ๐ Deploy by hand โ you ARE the deploy system
kubectl apply from your laptop worksโฆ and quietly makes you the single point of failure.
๐งโ๐ป Your laptop
YAML files + kubeconfig ๐
๐ซ Cluster
๐ช๐ช hello-school pods
1
kubectl apply -f k8s/
2
works! ๐ โฆtoday
๐
one week later
โ which version is live?
โ who changed it?
โ teammate deploys too?
๐ฑ only your memory knows
3
2 ๐ช Drift โ when reality stops matching the files
Every hand-edit that never lands back in git widens a silent, dangerous gap.
๐ YAML in git says
replicas: 2
image: v1
memory limit: 64Mi
๐ซ Cluster actually runs
replicas: 5 (Friday panic)
image: v2-hotfix-final-REAL
limit: 512Mi (kubectl edit)
โ
1
hotfix by hand, "just this once"
2
โฆand nobody writes it back to git
3
the gap = DRIFT: next "clean" deploy from git silently undoes the hotfix ๐ฅ
3 ๐ฎ CI/CD push โ the courier robot deploys for you
Every push is tested, built and delivered โ the human is out of the loop (mostly).
๐งโ๐ป dev
git push
๐ฎ CI/CD โ the courier robot
โ
test
๐ฑ build
๐๏ธ registry
holds the cluster's master key ๐
๐ซ Cluster
kubectl apply, from outside
1
2
same steps every time โ no "oops, forgot the tests"
3
PUSH deploy
4 ๐ช Limits of push โ the courier delivers and LEAVES
A push pipeline deploys moments; nobody guards the state in between.
๐ฎ pipeline run
deploys at 14:03โฆ then exits
๐ซ Cluster at 14:04+
unguarded until next push
1
๐ช drift creeps back in โ
who would even notice?
2
๐ cluster keys live OUTSIDE,
in the CI system
3
๐ซ๐ซ๐ซ 10 clusters =
10 keys + 10 pipeline configs
4
the fix isn't a better courier โ it's a guard who LIVES in the school โ Part 2
5 ๐ The GitOps idea โ reality must match the book
Declare the desired state in git; an agent inside the cluster converges reality toward it, forever.
๐ git repo
DESIRED state โ the book
k8s/ manifests, reviewed PRs
๐ซ cluster
ACTUAL state โ the rooms
pods, services, configs
๐ agent
compare โ converge
1
reads the book
2
looks at the rooms
3
fixes any difference
4
repeat every ~3 minutes, forever โ same reconcile loop as lesson 03 of the k8s course, one level up
6 ๐ค Install ArgoCD โ the robot moves into the school
One kubectl apply installs the whole robot; the UI is your window into its head.
๐งโ๐ป you
one kubectl apply
๐ซ your cluster
๐ช namespace: argocd โ the robot's room
๐ฅ๏ธ api-server
+ the web UI
๐ repo-server
clones git repos
๐ app-controller
the reconcile loop
1
install manifest
2
port-forward the UI โ https://localhost:8080 ยท login admin + initial secret ยท 3: the robot waits for its first plan page
7 ๐ The first Application โ one page of the plan book
An Application says: THIS repo, THIS folder, THIS destination. The robot does the rest.
๐ Application
repoURL: learn-argocd-school
path: k8s/
destination: gitops-school
syncPolicy: automated
๐ค ArgoCD
clones the repo,
renders the manifests
๐ git: k8s/ folder
deployment + service + ns
๐ช gitops-school
๐ช๐ช hello-school pods live!
1
kubectl apply -f argocd/
2
3
creates everything
from now on you never kubectl-apply the app again โ you edit the repo instead
8 ๐ Sync policies โ how strictly the robot follows the book
Manual = it asks first. Automated = it acts. Prune and selfHeal turn the strictness up.
๐ change lands in git
app becomes OutOfSync ๐ก
โ manual sync
robot ASKS โ you click Sync
โก automated sync
robot ACTS on its own
1
2
๐๏ธ prune: true
deleted in git โ deleted live
โฉ๏ธ selfHeal: true
hand-edits get reverted
3
4
start manual while learning โ automated + prune + selfHeal in production (the strict-but-fair caretaker)
9 ๐ชโฉ๏ธ Self-heal โ the chairs go back where the book says
Hand-made drift survives seconds, not months. Change the book, not the room.
๐ you, by hand
kubectl scale --replicas=5
๐ซ cluster: 5 pods
but the book ๐ says 2!
status: OutOfSync + drift
๐ค ArgoCD self-heal
re-applies the book โ
back to 2 pods โ
1
2
noticed in seconds
3
the book wins โ every time
4
want 5 replicas for real? edit the BOOK: change git, PR, merge โ robot scales up happily
10 โช Rollback โ flip the book to yesterday's page
In GitOps, git history IS deploy history โ so undoing a commit undoes the deploy.
commit A
image: v1 โ
commit B
image: v2 ๐ฅ bad!
commit C = revert B
image: v1 again โ
1
bad version ships (via git, at least!)
2
git revert โ 10 seconds
๐ค ArgoCD syncs C
cluster back on v1
3
๐งพ git log = deploy log:
who, what, when โ audit free
4
11 ๐ Helm, Kustomize & environments โ one recipe, many classrooms
Templates + per-environment values; one Application per room, and a master page listing them all.
๐ one recipe
Helm chart / Kustomize base
replicas: ___ image: ___
๐ values-dev.yaml
replicas: 1
๐ values-staging.yaml
replicas: 2
๐ values-prod.yaml
replicas: 5 + HPA
1
๐ช dev room
๐ช staging room
๐ช prod room
2
one Application each
๐ app of
apps
3
one page lists
all the pages
12 ๐ Secrets in GitOps + the final scorecard
Everything lives in gitโฆ except plaintext secrets. Encrypt them in, or reference them out.
โ password in the book
plaintext secret in git = leaked
1
๐ Sealed Secrets: encrypted IN git,
only the cluster can decrypt
2
๐๏ธ External Secrets: git holds only a
POINTER to a vault / AWS SM
3
๐ the scorecard
๐ฎ push
๐ค pull
drift watched? โ between deploys โ
every ~3 min
cluster keys โ outside, in CI โ
stay inside
deploy log โ ๏ธ CI history โ
git log itself
rollback โ ๏ธ re-run pipeline โ
git revert
many clusters โ keys ร N โ
one agent each
CI still needed? yes: tests + builds โ
Argo deploys
4
real teams use BOTH: the courier builds, the caretaker deploys
Start Lesson 01 โ
๐ All 12 lesson diagrams
๐งช Quiz
๐๏ธ Study plan
โฎ๏ธ Before & trade-offs
โธ๏ธ The Kubernetes course