Create storage buckets

Object storage buckets in Google Distributed Cloud (GDC) air-gapped appliance let you organize and store data within your project namespaces. You can follow the bucket naming guidelines and apply a Bucket custom resource to the management API server to provision Standard storage with an optional default retention period.

This document is for IT administrators within the platform administrator group and developers within the application operator group who provision and manage object storage buckets in GDC air-gapped appliance environments.

Before you begin

A project namespace manages bucket resources in the management API server. You must have a project to work with buckets and objects.

You must also have the appropriate bucket permissions to perform the following operation. See Grant bucket access.

To run commands against the management API server, sign in and generate the kubeconfig file for the management API server if you don't have one.

Storage bucket naming guidelines

Bucket names must adhere to the following naming conventions:

  • Be unique within the project. A project appends a unique prefix to the bucket name, ensuring there aren't clashes within the organization. In the unlikely event of a prefix and bucket name clash across organizations, the bucket creation fails with a bucket name in use error.
  • Have at least one and no more than 57 characters.
  • Refrain from including any personally identifiable information (PII).
  • Be DNS-compliant.
  • Start with a letter and contain only letters, numbers, and hyphens.

Create a bucket

To create a bucket, apply a bucket specification to your project namespace:

  kubectl --kubeconfig MANAGEMENT_API_SERVER_KUBECONFIG apply -f bucket.yaml

The following is an example of a bucket specification:

    apiVersion: object.gdc.goog/v1
    kind: Bucket
    metadata:
      name: BUCKET_NAME
      namespace: NAMESPACE_NAME
    spec:
      description: DESCRIPTION
      storageClass: Standard
      bucketPolicy:
        lockingPolicy:
          defaultObjectRetentionDays: RETENTION_DAY_COUNT

For more details, see the Bucket API reference.