Creating a BucketClass for Ceph RGW
Ceph Object Storage can be exposed to Kubernetes workloads via the Container Object Storage Interface (COSI), providing highly scalable and elastic storage for big‑data analytics, backup & restore, and machine‑learning scenarios. A BucketClass is required before users can provision buckets.
A BucketClass is a template resource that specifies the storage driver, authentication secret, and the deletion policy that will be applied to every bucket created from it.
TOC
Prerequisites
Step 1 – Prepare a Ceph Cluster
Choose one of the following:
Step 2 – Install the COSI Plug‑in
Install the following cluster plug‑ins:
- Alauda Container Platform COSI
- Alauda Container Platform COSI for Ceph
Refer to Installing for exact commands.
Step 3 – Prepare the Credential Secret
COSI retrieves RGW credentials from a Kubernetes Secret. Pick one method depending on your Ceph deployment.
Method A – Auto‑generate (Rook‑managed Ceph)
-
Create a CephObjectStoreUser in the rook‑ceph namespace:
-
Apply the manifest:
-
Retrieve the autogenerated Secret name (used later):
Method B – Manual (External Ceph)
-
Obtain AccessKey, SecretKey, and RGW Endpoint.
-
Create a Secret in the target project/namespace and label it so the UI can discover it:
Important: The label
app=rook-ceph-rgwis mandatory for the platform UI to list the Secret.
Step 4 – Create the BucketClass
Option 1 – UI Workflow
-
Navigate to Storage → Object StorageClass and click Create Object StorageClass.
-
Select Ceph 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 – Pick the Secret prepared in Step 3 (only Secrets with
app=rook-ceph-rgware 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 ceph-bucketclass.yaml with the correct Secret references:
Apply the manifest:
Verification & Next Steps
Verify the BucketClass:
Once the BucketClass is ready, you can create Bucket or BucketClaim resources referencing it, thereby provisioning S3‑compatible object storage for your applications.