This page guides you through how to list storage buckets within a Google Distributed Cloud (GDC) air-gapped project and view the configuration details for each bucket. Learn about the prerequisites and the steps using both the GDC console and command line interface (CLI). This information lets you gain full visibility of your object storage resources and helps you verify their configuration.

This page is for audiences such as IT admins within the infrastructure operator group or developers within the application operator group who are responsible for managing object storage resources in GDC air-gapped environments. For more information, see [Audiences for GDC air-gapped documentation](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/resources/audiences.md.txt).

## Before you begin

Storage buckets are resources scoped to a specific [project](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform/pa-user/project-management.md.txt). The project acts as a container, grouping your buckets and enabling their management through the Management API server. Before you can perform the operations on this page, you must either create a new project or select an existing one where you have sufficient permissions.

### Required IAM roles

Contact your IAM Project Admin to request the following roles in your project
namespace:

- **Bucket Project Admin** (`project-bucket-admin`): create, update, and delete storage buckets.
- **Bucket Object Project Viewer** (`project-bucket-object-viewer`): view and check details of storage buckets and objects.

For more information, see [Grant bucket access](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform/pa-user/grant-obtain-storage-access.md.txt#grant_bucket_access).

### Prepare your environment

To run commands against the management API server or the global API server, do the following:

1. [Sign in and generate](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform/pa-user/iam/sign-in.md.txt#zonal-resources-kubeconfig) the kubeconfig file for the zonal management API server if you don't have one.
2. For dual-zone buckets, do the following:
   - Verify with your Infrastructure Operator (IO) that the `BucketLocationConfig` custom resource has been created for your paired zones.
   - [Generate the kubeconfig file](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform/pa-user/iam/sign-in.md.txt#global-resources-kubeconfig) for the global API server.

## List storage buckets

### Console

1. In the navigation menu, click **Object Storage**. All buckets you have access to are listed in a table.

### kubectl

To list all the buckets that you have access to in a given object storage tenant, complete the following steps:

- Run the following command to list all buckets:

  ```bash
  kubectl get buckets --all-namespaces
  ```
- Run the following command to list all buckets in a namespace:

  ```bash
  kubectl get buckets --namespace NAMESPACE_NAME
  ```

## View bucket configurations

### Console

1. In the navigation menu, click **Object Storage**.
2. Click the name of the bucket of which you want to view the details.
3. Wait to be redirected to a detailed view page.

### kubectl

Use either command to view the configuration details for a bucket:

```bash
kubectl describe buckets/BUCKET_NAME --namespace NAMESPACE_NAME
```

```bash
kubectl get buckets/BUCKET_NAME --namespace NAMESPACE_NAME -o yaml
```