Creating a BucketClass for MinIO
MinIO integrates with Kubernetes through the Container Object Storage Interface (COSI) to provide scalable, S3-compatible object storage for analytics, backup & restore, and ML/AI workloads. Before provisioning buckets, define a BucketClass.
A BucketClass is a template resource that sets the storage driver, the authentication Secret, and the deletion policy applied to all buckets created from it.
TOC
Prerequisites
Step 1 - Prepare a MinIO Cluster
Ensure that a MinIO cluster is installed and accessible. Follow the MinIO installation documentation to deploy and configure your MinIO environment.
Step 2 - Prepare the Credential Secret
COSI retrieves MinIO credentials from a Kubernetes Secret. Collect the following values:
Endpoint- e.g.http://minio.minio-system.svcorhttps://minio.example.com:9000AccessKeySecretKey
Create the Secret in the target namespace and label it for UI discovery:
Important: The label app=minio is required for the platform UI to list the Secret.
Note: Key names are case-sensitive and must be exactly Endpoint, AccessKey, and SecretKey.
If you prefer GitOps, you can define the Secret declaratively:
Step 3 - Create the BucketClass
Option 1 - UI Workflow
-
Navigate to Storage → Object StorageClass and click Create Object StorageClass.
-
Select MinIO Object Storage as the driver.
-
Configure the following fields:
- Deletion Policy - How the underlying bucket is handled when its BucketClaim is deleted (default:
Delete). - Secret - Choose the Secret created in Step 2 (only Secrets with
app=minioare shown). - Allocate Projects - Optional: restrict usage to specific projects.
- Deletion Policy - How the underlying bucket is handled when its BucketClaim is deleted (default:
-
Click Create.
Option 2 - YAML (GitOps-friendly)
Create minio-bucketclass.yaml. The example below uses the MinIO COSI driver and points to a Secret with the correct Secret references.
Apply the manifest:
Verification and Next Steps
Verify the BucketClass:
Once the BucketClass is ready, create Bucket or BucketClaim resources referencing it to provision S3-compatible object storage backed by MinIO.