Multi-Environment Promotion with Kustomize Overlays in GitOps
Advanced · 30 minutes · 5 tasks, checked automatically · 100 points
In this advanced lab you will simulate a real-world GitOps promotion pipeline by building a complete Kustomize base-and-overlays directory structure, then progressively promoting a sample application from a **dev** environment through **staging** and into **prod** — all without touching Helm or raw manifests. You will learn how Kustomize patches, namePrefix/nameSuffix, replica scaling, resource limits, and ConfigMap generators differ per environment, and how to verify each promotion step deterministically with `kubectl`. By the end you will have three independent namespaces (`dev`, `staging`, `prod`) each running a correctly configured variant of the same application, mirroring how tools like Argo CD or Flux CD consume Kustomize overlays.
What you’ll learn
- Build a reusable Kustomize base containing a Deployment, Service, and ConfigMap for a sample web application
- Create per-environment overlays (dev, staging, prod) that customise replicas, resource limits, environment variables, and name prefixes using strategic merge patches and ConfigMap generators
- Apply each overlay to its own namespace and verify the correct configuration is running in every environment, demonstrating a GitOps-style promotion workflow
How this lab works
- Start the lab: One click starts a real Kubernetes cluster on your computer (kind), with kubectl ready in a toolbox terminal.
- Work through 5 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work reads your live cluster and says, task by task, what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Cluster: A real Kubernetes cluster on your computer (kind)
- Kubernetes: 1.34.8
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- Docker Desktop installed and running
- A kind cluster created in the Kubernetes Playground
Topics: kustomize, gitops, overlays, multi-environment, promotion, configmap-generator, strategic-merge-patch, kubernetes, kind
Create a free account to start this lab.