Skip to main content
In this lesson, you’ll configure FluxCD to pull plain YAML manifests from a different Git repository and apply them with Kustomize Controller. We’ll create a GitRepository source and a Kustomization resource step by step.

Prerequisites

  • A Kubernetes cluster with FluxCD v0.38+ installed
  • flux CLI configured with your cluster’s kubeconfig
  • Access to the bb-app-source repository on GitHub

1. Checkout the 2-demo Branch

Switch to the 2-demo branch in your bb-app-source repository:
You should see:

2. Review the Application Manifest

Inspect the Deployment manifest under manifests/. Notice the image version has been updated to 7.2.0:

3. Create the GitRepository Source

From your Flux cluster configuration directory (block-buster/flux-clusters/dev-cluster), run:
This generates:
Commit and push this file so Flux can fetch your manifests automatically.

4. Create the Kustomization Resource

Use the Flux CLI to define a Kustomization that points to the manifests folder in your bb-app-source repo:
The --prune=true flag will remove any Kubernetes resources in the target namespace that are not tracked by this Kustomization. Ensure you don’t have unmanaged resources in 2-demo.
Commit and push the Kustomization YAML so Flux can reconcile it.

5. Overview of Created Resources

Resource TypePurposeFlux CLI Example
GitRepositoryFetch remote plain YAML manifestsflux create source git bb-app-2demo … --export > source.yml
KustomizationApply and reconcile manifests in the 2-demo NSflux create kustomization bb-app-2demo-kustomize … > kustomize.yml

6. Verify Flux Reconciliation

First, check your Git sources:
Expected output:
Next, verify Kustomizations:
You should see:

7. Confirm Kubernetes Resources

List your namespaces and workload in 2-demo:
You should observe the block-buster Deployment, Service, and Pods running version 7.2.0.

8. Access the Application

Find the NodePort for the block-buster-service:
Open your browser at http://<NODE_IP>:<NODE_PORT>. You’ll see the updated “Block Buster” game interface running version 7.2.0:
The image shows a "Block Buster" game interface with colorful blocks, a ball, and a paddle. It includes game details like pod name, IP, and version information.

Watch Video