Skip to Content
Tuan Tran
GitOps & Progressive Delivery

GitOps Interactive Exercises

Render an environment

Pick a generator and environment. Compare which input fields change and which Deployment fields they produce. The preview illustrates the manifest excerpts rather than executing Helm or Kustomize in the browser.

Effective Helm values
replicaCount: 1
image:
  repository: nginx
  tag: "1.27"
resources:
  cpuRequest: 100m
Rendered Deployment excerpt
kind: Deployment
metadata:
  name: payment-service
spec:
  replicas: 1
  template:
    spec:
      containers:
        - name: payment
          image: nginx:1.27
          resources:
            requests:
              cpu: 100m

Destination development · 1 desired replicas · nginx:1.27

Continue with the full Helm and Kustomize walkthrough.

Model auto-sync and self-heal

Start with five live replicas at a previously synced revision. Pick a new Git revision or a live-only edit. Predict the result before advancing the controller. Each click models one comparison and, when eligible, one successful sync. A real cluster adds time for rendering, permissions, queued operations and workload rollout.

Desired replicas 8 · Live replicas 5 · OutOfSync

Reproduce the scenario in the hands-on GitOps lab.

See how jitter spreads refresh work

Assume 1,000 Applications become eligible at the same time. Adjust the maximum delay added to the base interval of 120 seconds. The chart uses an illustrative uniform distribution so the same settings always yield the same result. Queue capacity and processing time are outside the model.

Scheduled window 120–180 seconds. Busiest ten-second window has 167 refreshes.

120–130s167
130–140s166
140–150s167
150–160s167
160–170s166
170–180s167

Simulate an SSA field conflict

Start with team-a owning spec.replicas: 3. Try applying five as team-b. After the conflict, apply three to share ownership. Then try to change the shared value and observe what happens with and without force. The simulator models one field on an existing object. The cluster lab also covers how an owner can relinquish the field by omitting it from its next intent.

Live replicas 3 · Owners team-a

Continue with the SSA ownership lab.

Compare CSA and SSA after live drift

The live Deployment starts at eight replicas. Select the apply method and the next declaration. In the CSA scenario, the checkbox controls whether the last-applied annotation included replicas. In the independent SSA scenario, an external manager owns the live replica count. This exercise models each selection from the same initial live object and assumes ordinary Deployment defaulting without admission mutations or concurrent changes.

Last-applied replicas: 3 · Live replicas before apply: 8

Accepted · Resulting replicas 3. The local declaration differs from live. Client-side apply sets the declared value.

Read the worked patch calculation before trying the server dry run.

Compare atomic and keyed list ownership

The same resource contains payment and logging backends. In the atomic case, Manager A owns the whole list. In the keyed case, Manager A owns the payment fields and the logging entry identity, and the live logging URL has no owner. Manager B starts with no ownership. Toggle the list schema, submitted intent, and force option. Each selection starts with the same live state.

Initial live state
spec:
  backends:
    - name: payment
      url: payment.svc
    - name: logging
      url: logging.svc
Manager B’s submitted intent
spec:
  backends:
    - name: analytics
      url: analytics.svc
Resulting live state
spec:
  backends:
    - name: payment
      url: payment.svc
    - name: logging
      url: logging.svc

409 Conflict. Manager A owns the entire list. Manager B’s different value conflicts, so the list is unchanged.

Try the APIConfig lab to inspect the actual field sets.

Simulate an ApplicationSet Matrix

Select service directories and registered cluster names. Each selected directory is paired with every selected cluster. The output lists the desired Application CR names. Removing a cluster from this preview removes its combinations from the desired set. On a real cluster, ApplicationSet policy and deletion finalizers determine what happens to existing Applications and workloads.

Service directories
Registered clusters

2 services × 4 clusters = 8 Applications

  • payment-gke-dev
  • order-gke-dev
  • payment-gke-staging
  • order-gke-staging
  • payment-gke-prod
  • order-gke-prod
  • payment-gke-prod-2
  • order-gke-prod-2

See the complete Matrix ApplicationSet.

Check your ApplicationSet understanding

What does the ApplicationSet controller create?
Helm values change but the generated Application spec stays the same. Which controller syncs the Deployment?
Which effective policy allows updates but keeps Applications that stop matching the generator?

Continue with repository design and environment promotion.

Promote a release through environments

Development is already running the candidate image and its checks passed. Promote the same artifact to staging, then require staging test results and production approval before updating production. This exercise models changes to deployment configuration. The release gates and reconciliations are simulated.

Development v1.5.0
Candidate digest verified

Staging v1.4.2
Previous digest

Production v1.4.2
Previous digest

Read the complete promotion and rollback walkthrough.

Track the production GitOps lab

Use this checklist alongside the release workflow. Check off each task after validating its result.

0 of 8 tasks complete

Production GitOps lab tasks

Add a small service, Dockerfile, and unit tests.

Create separate dev, staging, and production configuration paths.

Render a Deployment and Service using per-environment image values.

Use kind or another disposable Kubernetes cluster.

Check that each Application reads its own values file and syncs to the intended namespace or cluster.

Record both a readable tag and the exact digest returned by the registry.

Change dev, staging, and production through Git and verify each rollout.

Restore the previous digest in Git and verify Argo CD syncs it.

Check your GitOps security understanding

Follow the secret value from the external provider to a running process, then identify which layer authorizes the API request.

Which controller updates the Kubernetes Secret after a periodic provider refresh?
What is needed when a running container consumes the rotated Secret through an environment variable?
Does an Argo CD AppProject replace Kubernetes RBAC?

Review Workload Identity and External Secrets and admission policy bindings.

Check your admission control understanding

Trace how a webhook changes an object, what happens when a call times out, and how admission affects Argo CD's prediction.

How can a mutating webhook change the candidate object?
A matching webhook times out with failurePolicy set to Ignore. What happens next?
How does Argo CD include mutating webhook results in Server-Side Diff?

Review Admission Controllers and Policy and try its SSA dry-run lab.

Reconcile a WebApp

Edit the WebApp's desired count, run reconciliation, then scale the Deployment directly and run reconciliation again. An actual controller gets those requests through watches and its queue. Here the button models processing one request against current state. The Deployment count is spec.replicas; rollout readiness is outside the simulator.

Deployment requests 3 replicas · Replica counts match

Generation 1 · Observed generation 1

Reconcile runs 0 · Operator Deployment writes 0

Try a second run after the counts match. The run counter should increase without another Deployment write. See the WebApp controller lab.

Check your operator understanding

What happens when a WebApp CRD is installed without a controller?
Does calling .Owns(&Deployment{}) create owner references?
What happens after a reconciler returns an ordinary error?
Why add a cleanup finalizer?

Check your understanding

Select an answer for each question and check your reasoning.

What does the repo server produce?
A live Deployment changes while Git stays the same. How can Argo CD see the change?
The Deployment spec matches Git, but the rollout is ongoing. Which result fits?

Model a Deployment rolling update

Step through a four-replica update with one surge slot and zero allowed unavailability. The model omits terminating Pods and shows selected states. Readiness, scheduling and termination determine the actual timeline.

Desired replicas 4 · maxSurge 1 · maxUnavailable 0

Step 1 of 6. Four v1 replicas are available.
v1 available 4 · v2 available 0 · v2 starting 0

Evaluate a canary measurement

Choose a traffic weight and enter the observed request count, success rate, and P95 latency. The traffic weight describes exposure and does not generate or change the measurements. This exercise evaluates one window. A real AnalysisRun can evaluate multiple windows and apply separate limits to failed, inconclusive and error outcomes.

Require at least 100 requests, success rate of 99% or higher, and P95 of 300 ms or lower.

Failed measurement. At least one quality threshold was violated.

Check your progressive delivery understanding

Four replicas use maxSurge=1. What is the nominal surge ceiling before accounting for terminating Pods?
What does setWeight=20 control in a basic canary without a traffic router?
What happens to Git after an AnalysisRun fails and Rollouts aborts the release?
Can a Synced Application contain a Degraded Rollout?

Continue with the full progressive delivery lesson.

On this page