k8s-manifests with two subfolders, app-A and app-B, each containing its own manifests. By the end, you will:
- Store MinIO credentials in a Kubernetes Secret
- Register the bucket as a Flux
Bucketsource - Apply the
app-Amanifests via a FluxKustomization
Prerequisites
- A running Kubernetes cluster
- Flux CD installed (Source and Kustomize Controllers)
- A MinIO (or other S3-compatible) endpoint
- A bucket named
k8s-manifestscontainingapp-A/andapp-B/
1. Create the MinIO Credentials Secret
Store your MinIO access key and secret key as a Kubernetes Secret in theflux-system namespace:
Ensure your credentials are scoped to the least-privileged user on your S3 endpoint.
2. Register the Flux Bucket Source
Define a FluxBucket resource that points to your S3-compatible endpoint. Replace the --endpoint value with your MinIO service address if different.
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 theapp-A manifests:
app-A to your cluster.
Summary of Resources
| Resource | Purpose | Flux Command |
|---|---|---|
| Secret | Store MinIO S3 credentials | kubectl create secret generic minio-crd … |
| Bucket (Source) | Fetch objects from k8s-manifests | flux create source bucket minio-bucket … |
| Kustomization | Build & apply manifests from app-A | flux create kustomization kust-app-a … |