Your DevOps study space

Real explanations. Videos with tests. Fresh exams every time. Keep the streak alive and watch the XP stack up.

GitOps with Argo CD · DevOps Docs · StackwisePlanDevOps GitOps with Argo CD · DevOps Docs · StackwiseCodePython GitOps with Argo CD · DevOps Docs · StackwiseBuildDocker GitOps with Argo CD · DevOps Docs · StackwiseTestDevOps GitOps with Argo CD · DevOps Docs · StackwiseReleaseGit GitOps with Argo CD · DevOps Docs · StackwiseDeployKubernetes GitOps with Argo CD · DevOps Docs · StackwiseOperateLinux GitOps with Argo CD · DevOps Docs · StackwiseMonitorDevOps

Pick a topic

Eight tracks, each with docs, a cheat sheet, videos and tests.

How it works

One loop, repeated until it sticks.

Jump back in

Picked up from where you left off.

Free forever

Your DevOps journey starts with one click.

Sign in with Google or GitHub to open every chapter, video, test and challenge. Your progress is saved wherever you learn.

GitOps with Argo CD

In the pipelines so far, CI pushes each new version into the cluster. GitOps flips that around: a Git repository describes exactly what should run, and an agent inside the cluster keeps the cluster matching it. Deploying becomes a commit, rolling back becomes a revert, and every change has a reviewer and a history.

Push versus pull deploys

In a push deploy, the CI job runs kubectl apply or helm upgrade against the cluster. That works, but CI needs admin credentials for every cluster, and nothing notices if someone later edits the cluster by hand.

In a pull (GitOps) deploy, an agent such as Argo CD or Flux runs inside the cluster, watches a Git repository and applies whatever it says. CI never touches the cluster; it only commits to Git. If the cluster drifts from Git, the agent sees it and can put it back.

Two principles carry the whole idea: Git is the single source of truth for what runs, and the cluster is reconciled continuously, not just at deploy time.

push deployCIhas cluster adminclusterkubectl applyhand edits go unnoticedpull deploy (GitOps)CIcommits a tagconfig repothe truthgit pushclusterArgo CDwatches Gityour appspullsapplies
With GitOps, CI never holds cluster credentials, and the cluster keeps matching Git: a change made by hand is noticed and undone.

The pieces

  • A config repository with the Kubernetes manifests, Helm values or Kustomize overlays for each app and environment. Teams usually keep it separate from the app's code, so a config change doesn't trigger an app build and the history reads like a deploy log.
  • Argo CD, installed in the cluster, with a web UI and a CLI.
  • An Application: an Argo CD object that says "keep this path of this repo applied to this namespace".

Install Argo CD on your practice cluster

Use the kind cluster from Kubernetes chapter 6:

$ kubectl create namespace argocd
$ kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
$ kubectl -n argocd get pods                       # wait until every pod is Running

# the first admin password, then the UI on https://localhost:8080 (accept the self-signed certificate)
$ kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
$ kubectl port-forward svc/argocd-server -n argocd 8080:443

Log in as admin. The argocd CLI works too: argocd login localhost:8080 --username admin --insecure.

Your first Application

Argo CD's own example repository has a small app called guestbook. This manifest tells Argo CD to keep it running in a guestbook namespace:

# guestbook-app.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: guestbook
  namespace: argocd                 # Applications live in Argo CD's namespace
spec:
  project: default
  source:
    repoURL: https://github.com/argoproj/argocd-example-apps.git
    targetRevision: HEAD            # a branch, a tag or a commit
    path: guestbook                 # the folder with the manifests
  destination:
    server: https://kubernetes.default.svc   # this same cluster
    namespace: guestbook
  syncPolicy:
    automated:
      prune: true                   # delete things that were removed from Git
      selfHeal: true                # undo changes made by hand in the cluster
    syncOptions:
      - CreateNamespace=true

$ kubectl apply -f guestbook-app.yaml
$ kubectl -n guestbook get pods                    # Argo CD created them, not you

In the UI the app shows two statuses: Synced / OutOfSync (does the cluster match Git?) and Healthy / Progressing / Degraded (are the resources actually working?).

Drift and self-healing

Try changing the cluster behind Argo CD's back:

$ kubectl -n guestbook scale deployment guestbook-ui --replicas=5
$ kubectl -n guestbook get deployment guestbook-ui -w     # within moments it goes back to what Git says

With selfHeal on, a hand-made change lasts seconds. That's the point: the only way to change production is a reviewed commit. Without selfHeal, the app just turns OutOfSync and waits for you to sync it.

How a new version gets deployed

mergeapp repoCItest, buildregistry:3f9c2a1config reponew tagArgo CDsyncsroll back: git revert on the config repo
Every deploy and every rollback is a commit, with a reviewer and a timestamp.
  1. A developer merges a change to the app repository.
  2. CI tests it, builds the image and pushes shop-api:3f9c2a1 to the registry, exactly as before.
  3. CI (or a bot such as Argo CD Image Updater) commits the new tag into the config repository, often through a pull request for production.
  4. Argo CD notices the commit (it checks about every 3 minutes by default, or straight away with a webhook) and rolls the Deployment out.

Rolling back is git revert on the config repository: the old tag comes back, and Argo CD applies it. The history shows who deployed what and when, and who rolled it back.

More than one app or environment

  • A common layout is one folder per environment in the config repo (envs/staging, envs/production), each an overlay with its own replicas and image tag, and one Application per folder.
  • The app of apps pattern is one Application whose folder contains other Application manifests, so a whole cluster is bootstrapped from one object.
  • ApplicationSets generate Applications from a template, for example one per cluster or one per folder.

Flux is the other big GitOps tool. Both Argo CD and Flux are graduated CNCF projects; Argo CD is known for its UI, Flux for being a set of small controllers you drive entirely from Git.

Common problems

  • Stuck OutOfSync on a field you never set: something else in the cluster (an autoscaler, a mutating webhook) changes it. Tell Argo CD to ignore that field with ignoreDifferences, or let the HPA own replicas by leaving it out of the manifest.
  • "repository not accessible": private repos need credentials. Add them with argocd repo add using a deploy key or token.
  • Rollback button greyed out: Argo CD won't roll back while automated sync is on, because Git would win again a moment later. Revert in Git instead.
  • Secrets in the config repo: never commit plain Kubernetes Secrets. Use Sealed Secrets, SOPS, or the External Secrets Operator to pull them from a secrets manager.

Questions

Pick an answer. Get it wrong and you can try again right away, no waiting. 10 questions per topic - pick a filter below, then use Recreate questions for a fresh set on that topic.

Fresh questions every time

Exam

A mixed test across the whole site, shuffled so you never know which topic comes next. When you submit, every mistake comes with the reason and a jump to the exact moment in the video that explains it.

30 questions 6 topics 20 minute limit Up to 70 XP
1–4 answer · ←→ move
History

Essay

0 / 200-250 words
Sample answer
History
0:00 / 0:00
Not started

on YouTube
Subscribe

Topic progress

Activity

Achievements

Settings

Your profile and your account.

Profile details

* Required. Saved in this browser until you sign in.

Letters, numbers, dots, dashes and underscores.
0 / 160

Account

Checking…

App

Install Stackwise on your phone or computer. It opens in its own window from your home screen, and the Docs and cheat sheets you've opened keep working without internet.

Only admins can see this

Dashboard

Sign-ups, activity, messages and reviews in one place.

Prove it

Certificates

Pass a topic's test and get a certificate with its own public page you can share or add to LinkedIn. Each test is 10 questions drawn at random and graded on the server; you need 8 right, you have 15 minutes, and you get one try per topic a day.

From first command to production

Linux for DevOps

A path through Linux the way DevOps engineers use it: ten stages, every command explained with its flags, examples, real output and mistakes, the combinations engineers chain together, and incidents worked through step by step. Practise everything in a safe lab folder.

Before the interview

Interview prep

Questions that come up in real DevOps interviews, with the kind of answer that lands. Say yours out loud first, then compare. Each one links to the chapter that goes deeper.

    Private to you

    My notes

    Everything you wrote down while watching and reading, in one place. Saved to your account, never shown to anyone.