Mounting a bucket to a container
Written by
Updated at February 6, 2024
Note
This feature is in the Preview stage. You can only mount a read-only bucket by default. To mount a bucket with write permissions, contact tech support
Management console
API
- In the management console
, select the folder with your container. - Select Serverless Containers.
- Select the container.
- Go to the Editor tab.
- In block Settings, select or create a new service account with the role:
storage.viewer
to only read data from the mounted bucket.storage.uploader
to read and write the mounted bucket data.
- Under Mounted buckets, click Add bucket.
- Specify the following in the field:
- Mount path: Mount path. Use this path to access the directory in which the bucket is mounted.
- Bucket: Name of the bucket you want to mount. Alternatively, you can create a new bucket.
- Folder: Folder within the bucket. If you leave this field empty, the entire bucket will be mounted.
- Click Create revision.
To mount a bucket, use the deployRevision REST API method for the Container resource or the ContainerService/DeployRevision gRPC API call.