Skip to main content
Leverage Flux’s Source Controller to fetch Kubernetes manifests from an S3-compatible store (MinIO) and deploy them via GitOps. In this walkthrough, you will:
  • Set up a dedicated Git branch with demo manifests
  • Deploy MinIO locally as an S3 replacement
  • Create a bucket, upload manifests, and configure Flux sources
  • Apply and verify your application in the cluster

1. Prepare the Demo Branch

Open your terminal in Visual Studio Code and switch to the 4-demo branch of the bb-app-source repo:
In this branch, the 4-demo directory contains three manifests:
  • namespace.yml
  • deployment.yml (version 7.4.0)
  • service.yml
Example excerpt from deployment.yml:

2. Deploy MinIO as an S3-Compatible Store

Apply the MinIO manifest to create a namespace, pod, and service:
Verify the MinIO deployment:
By default, MinIO uses minio-admin:minio-admin for S3 authentication. Keep this credential secure in production.

3. Create a Bucket and Upload Manifests

  1. Open the MinIO console at http://localhost:30040
  2. Authenticate with:
    • Username: minio-admin
    • Password: minio-admin
  3. Create a bucket named bucket-bb-app using all defaults.
The image shows a MinIO Object Store interface where a user is creating a new bucket with options for versioning, object locking, and quota settings. The sidebar includes various menu options like Access Keys, Documentation, and Settings.
  1. In the Object Browser, select bucket-bb-app.
The image shows a MinIO Object Store interface with a bucket named "bucket-bb-app" that has no usage or objects. The sidebar includes options like Object Browser, Access Keys, and Settings.
  1. Create a folder called app740 and upload namespace.yml, deployment.yml, and service.yml from your local bb-app-source/4-demo folder.
The image shows a MinIO Object Store interface with an open file explorer window displaying folders on a local drive.
  1. Confirm all three manifests appear under bucket-bb-app/app740/.
The image shows a web interface of an object storage browser with a bucket named "bucket-bb-app" containing three YAML files: deployment.yml, namespace.yml, and service.yml. A sidebar on the left displays various menu options, and a download/upload status window is visible on the right.

4. Create a Flux Bucket Source

Instead of Git, Flux will track this S3 bucket via the Bucket API. Generate the source manifest and export it to your cluster repo:
Generated Bucket resource:

5. Create a Flux Kustomization

Point your Kustomization at the app-740 folder in the bucket:
Generated Kustomization:

6. Create the MinIO Credentials Secret

Flux requires a Kubernetes secret for S3 access. First, confirm Flux sees no secret:
Create minio-crds in the flux-system namespace:
Reconcile and verify:
Storing credentials in plain text can be insecure. Consider using Sealed Secrets or a vault in production.

7. Confirm Deployment in 4-demo

Flux will now apply the manifests under the 4-demo namespace:
Example output:
Access the application at http://localhost:30004. In version 7.4.0, a new score counter updates whenever a brick is hit.

Resources & References

Watch Video

Practice Lab