Skip to main content
Welcome to this hands-on tutorial on using the Kustomize controller to apply overlays via Flux CD. In this lesson, you’ll learn how to:
  1. Switch to the 3-demo branch containing a kustomization.yaml
  2. Create a Flux GitRepository source
  3. Define a Flux Kustomization resource
  4. Verify the setup with Flux commands
  5. Inspect the deployed Kubernetes resources
  6. View the updated Block Buster application
By the end, you’ll have a working overlay that skips the build phase and applies changes automatically.

1. Switch to the 3-demo Branch

First, clone or navigate to your application source and check out the 3-demo branch where the kustomization.yaml is already defined:
You should see:
List the directory to confirm all files:
Contents of kustomization.yaml:
Because the kustomization.yaml is present, the Kustomize controller will skip the normal build phase and apply resources directly.

2. Create a Git Source in the Flux Cluster

Switch to your Flux configuration repository:
Define a GitRepository resource that points to branch 3-demo of your app repo:
3-demo-source-git-bb-app.yaml:
Flux will poll the Git repository every 10 seconds and store an artifact for the specified branch.

3. Create the Kustomization Resource

Next, define a Flux Kustomization that applies the overlay found under kustomize:
Contents of 3-demo-kustomize-git-bb-app.yaml:
Commit and push both Flux manifests:

4. Verify with Flux

Check that the Git source is registered:
Expected output:
Then confirm the overlay is applied:
Expected output:

5. Inspect Deployed Resources

List all namespaces to ensure 3-demo exists:
View resources in the 3-demo namespace:
Sample output:

6. View the Updated Application

Open your browser to http://<node-ip>:30008. You’ll notice that the game now shows three lives instead of one:
The image shows a "Block Buster" game interface with colorful blocks, a ball, and a paddle. It also displays technical details like pod name, IP, and app version on the left.

Watch Video

Practice Lab