This page shows you how to delete objects from Google Distributed Cloud (GDC) air-gapped storage buckets.
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.
Required IAM roles
Contact your IAM Project Admin to request the following roles in your project namespace:
- Project Bucket Admin (
project-bucket-admin): create, update, and delete storage buckets. - Project Bucket Object Viewer (
project-bucket-object-viewer): view and check details of storage buckets and objects.
For more information, see Grant bucket access.
Prepare your environment
To run commands against the management API server or the global API server, do the following:
- Sign in and generate the kubeconfig file for the zonal management API server if you don't have one.
- For dual-zone buckets, do the following:
- Verify with your Infrastructure Operator (IO) that the
BucketLocationConfigcustom resource has been created for your paired zones. - Generate the kubeconfig file for the global API server.
- Verify with your Infrastructure Operator (IO) that the
Delete objects in buckets
Console
- In the navigation menu, click Object Storage.
- Click the name of the bucket containing the objects.
- Wait to be redirected to the Bucket details page with objects listed in a table.
- Navigate to the object's detail page and click Permanently delete. Alternatively, in the bucket object list view, select the checkbox next to the object and then click Permanently delete.
- Wait a few minutes and refresh the page to check that the object is deleted.
Note that all objects in dual-zone buckets are versioned, so deleting an object won't remove that object from storage. Instead, the object will be marked for deletion and will no longer be visible in LIST calls. The object can still be retrieved by specifying its version ID. An object is permanently deleted only if you specify the versionID when performing the deletion.
gdcloud
Delete a file from a bucket:
gdcloud storage rm s3://FULLY_QUALIFIED_BUCKET_NAME/OBJECT
Crypto shred objects in buckets with encryption v2
Retrieve all AEADKeys that belong to a bucket:
kubectl get aeadkeys -n PROJECT_NAMESPACE -l cmek.security.gdc.goog/resource-name=FULLY_QUALIFIED_BUCKET_NAMEFollow Delete a key to delete the intended AEADKey to crypto shred objects.
Crypto shred dual-zone buckets
- Retrieve all
MZAEADKeysthat belong to a bucket:
kubectl --kubeconfig GLOBAL_API_SERVER_KUBECONFIG \
get mzaeadkey -n PROJECT_NAMESPACE -l cmek.security.gdc.goog/resource-name=FULLY_QUALIFIED_BUCKET_NAME
- For each
MZAEADKey, use the following command to delete the key and its zonalAEADKeyreplicas:
kubectl --kubeconfig GLOBAL_API_SERVER_KUBECONFIG \
delete mzaeadkey KEY_NAME --namespace=PROJECT_NAMESPACE