Skip to main content

Create a bucket

A bucket is where you keep files and objects. To create one, create a bucket claim in a namespace — from the console or with kubectl.

warning

Do not create from the workspace Buckets page. That view only lists existing workspace buckets. Creation always goes through Bucket claims in a namespace.

warning

The claim name must be unique and cannot be changed later. If the name is already taken, creation fails.

Create from the console​

New bucket claim form in the console

  1. Open your workspace, then open a namespace.
  2. In the namespace nav, under Object Storage, open Bucket claims.
  3. Click New bucket claim.
  4. In the panel, fill in Name (for example app-data).
  5. Optionally open Advanced:
    • Enable versioning
    • Max size (for example 10Gi) and Max objects
  6. Click Create.
  7. Wait until the claim status is Ready.
tip

A new bucket grants access to nobody by itself. Use Bucket access for credentials, or set the bucket policy from the claim’s detail page.

Create with kubectl​

Apply an S3BucketClaim in the namespace (not an S3Bucket):

zsh
❯ kubectl -n <namespace> apply -f - <<EOF
❯ apiVersion: oss.tapsicloud.com/v1alpha1
❯ kind: S3BucketClaim
❯ metadata:
❯ name: app-data
❯ spec:
❯ versioning: false
❯ EOF

Replace <namespace> with your namespace. Assumes your workspace kubeconfig and context are already configured.

Check status:

zsh
❯ kubectl -n <namespace> get s3bucketclaims app-data

When Phase is Ready, the bucket is ready to use.

Optional settings​

!manifest.yaml×
tapsicloud › manifest.yaml
1apiVersion: oss.tapsicloud.com/v1alpha1
2kind: S3BucketClaim
3metadata:
4 name: app-data
5spec:
6 versioning: true
7 deletionPolicy: Delete # Delete | Retain | DeleteWithContents
8 quota:
9 maxSize: 10Gi # Kubernetes quantity; omit for unlimited
10 maxObjects: 100000
✓ dry-runLn 10 · YAML
OptionIn plain terms
versioningKeep previous versions of objects
quota.maxSize / quota.maxObjectsCap total size or object count
deletionPolicy: DeleteOn claim delete, refuse if the bucket is not empty (default)
deletionPolicy: RetainKeep the bucket after the claim is removed
deletionPolicy: DeleteWithContentsDelete all contents, then the bucket — irreversible

In the console, versioning and quota are under Advanced. Changing deletionPolicy is usually done from the claim’s own page.

tip

Do not upload or connect clients until the status is Ready.