Skip to main content
In this guide, you’ll learn how to use Flux CD’s Source Controller to fetch Kubernetes manifests from an S3-compatible bucket (for example, MinIO). We assume you have a bucket named k8s-manifests with two subfolders, app-A and app-B, each containing its own manifests. By the end, you will:
  1. Store MinIO credentials in a Kubernetes Secret
  2. Register the bucket as a Flux Bucket source
  3. Apply the app-A manifests via a Flux Kustomization

Prerequisites

  • A running Kubernetes cluster
  • Flux CD installed (Source and Kustomize Controllers)
  • A MinIO (or other S3-compatible) endpoint
  • A bucket named k8s-manifests containing app-A/ and app-B/

1. Create the MinIO Credentials Secret

Store your MinIO access key and secret key as a Kubernetes Secret in the flux-system namespace:
Expected output:
Ensure your credentials are scoped to the least-privileged user on your S3 endpoint.

2. Register the Flux Bucket Source

Define a Flux Bucket resource that points to your S3-compatible endpoint. Replace the --endpoint value with your MinIO service address if different.
Sample output:
This creates a Bucket named minio-bucket in the flux-system namespace, which tars and retrieves all contents under k8s-manifests.
Using --insecure disables TLS verification. Only use this flag in trusted environments or testing scenarios.

3. Apply Manifests with Flux Kustomization

Now that Flux can fetch the bucket contents, configure a Kustomization to build and apply the app-A manifests:
Sample output:
Flux will now periodically reconcile and apply the contents of app-A to your cluster.

Summary of Resources


Watch Video