Skip to content
Object storage

Object storage

Kubrain gives you S3-compatible object storage. You address buckets by name with path-style addressing, using any S3 client or SDK.

Create and list

kubrain bucket create assets              # private by default
kubrain bucket create media --public      # anonymous world-readable at its public URL
kubrain bucket list                       # live object count + size per bucket
kubrain bucket get assets

--public is fixed at creation and makes objects world-readable. Buckets are idempotent; the first one also provisions your tenant S3 user.

Get credentials

kubrain bucket credentials --output s3.env    # writes endpoint + key pair, mode 0600

One key pair per tenant opens every one of your buckets (and nothing else). The tool writes to a file and returns only a confirmation — never echo it into the conversation. Use it with any S3 client, path-style:

# s3.env sets the endpoint + AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY
aws --endpoint-url "$S3_ENDPOINT" s3 cp ./logo.png s3://assets/logo.png

Configure your SDK with forcePathStyle: true and the endpoint from bucket credentials.

Delete

kubrain bucket delete assets              # EMPTY buckets only — empty it first

Non-empty deletes are refused; clear the objects with your S3 credentials, then delete. Confirm first — it’s destructive.

See also