Delete an Object Storage Bucket

If you do not need an Object Storage bucket anymore, you can delete it in the same way as you would with any other object in your cluster:

$ oc delete objectbucket my-bucket


By default, deleting the ObjectBucket will also recursively delete all objects within it and the bucket itself.

To prevent that, there’s a deletionPolicy called DeleteIfEmpty. As the name suggests, it will then only delete the bucket if it’s empty. However, you will still lose access to the data. If you’ve deleted a bucket by mistake and had the DeletIfEmpty policy set, please contact and we will help you get your data back.

kind: ObjectBucket
  name: my-cool-bucket
  namespace: my-cool-ns
    bucketName: my-bucket-change-name
    region: ch-gva-2
    bucketDeletionPolicy: DeleteIfEmpty
Before deleting an ObjectBucket with deletion policy DeleteIfEmpty be sure to remove all data from the bucket itself. Failing to do so may incur additional costs due to bucket not being effectively deleted. Please contact for further assistance.