Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Cette page vous explique comment créer un bucket de stockage pour vos projets Google Distributed Cloud (GDC) isolés. Il couvre les prérequis, les étapes de création et de validation, ainsi que les consignes d'attribution de noms. Cela vous permet d'établir un stockage d'objets conforme et bien configuré qui répond aux besoins de vos déploiements isolés.
Cette page s'adresse à des audiences telles que les administrateurs informatiques du groupe des opérateurs d'infrastructure ou les développeurs du groupe des opérateurs d'applications qui souhaitent provisionner et gérer des buckets de stockage d'objets pour des projets dans des environnements GDC isolés. Pour en savoir plus, consultez la documentation sur les audiences pour GDC en mode air-gapped.
Avant de commencer
Un espace de noms de projet gère les ressources de bucket sur le serveur de l'API Management. Vous devez disposer d'un projet pour travailler avec des buckets et des objets.
Vous devez également disposer des autorisations de bucket appropriées pour effectuer l'opération suivante. Consultez Accorder l'accès à un bucket.
Consignes de dénomination des buckets de stockage
Les noms de buckets doivent respecter les conventions de dénomination suivantes :
être unique dans le projet ; Un projet ajoute un préfixe unique au nom du bucket, ce qui évite les conflits au sein de l'organisation. Dans le cas peu probable où un préfixe et un nom de bucket entreraient en conflit entre plusieurs organisations, la création du bucket échouerait et un message d'erreur "Nom de bucket déjà utilisé" s'afficherait.
N'incluez aucune information permettant d'identifier personnellement l'utilisateur.
être conforme au DNS ;
comporter entre 1 et 55 caractères ;
Commencez par une lettre et n'utilisez que des lettres, des chiffres et des traits d'union.
Créer un bucket
Console
Dans le menu de navigation, cliquez sur Stockage d'objets.
Cliquez sur Créer un bucket.
Dans le flux de création de bucket, attribuez un nom unique à tous les buckets du projet.
Saisissez une description.
Facultatif : Cliquez sur le bouton toggle_off pour définir une règle de conservation et saisissez le nombre de jours de votre choix. Contactez votre responsable des opérations si vous devez dépasser les limites de la règle de conservation.
Cliquez sur Créer. Un message de confirmation s'affiche et vous êtes redirigé vers la page Buckets.
Pour vérifier que vous avez bien créé un bucket, actualisez la page Buckets au bout de quelques minutes et vérifiez que l'état du bucket passe de Not ready à Ready.
CLI
Pour créer un bucket, appliquez une spécification de bucket à l'espace de noms de votre projet :
Notez que seul le chiffrement V2 est compatible avec les buckets à double zone. Toutes les opérations de création, de mise à jour ou de suppression d'une ressource de bucket à double zone doivent être effectuées sur le serveur d'API global.
Vérifier la création du bucket et des ressources associées
Une fois le bucket créé, vous pouvez exécuter la commande suivante pour confirmer et vérifier les détails du bucket :
kubectldescribebucketsBUCKET_NAME-nNAMESPACE_NAME
La section État comporte deux champs importants : Chiffrement (pour les détails du chiffrement) et Nom complet (qui contient le FULLY_QUALIFIED_BUCKET_NAME).
Chiffrement v1
Ces informations concernent la clé AEAD nommée obj-FULLY_QUALIFIED_BUCKET_NAME, qui sert de référence à la clé de chiffrement utilisée pour chiffrer les objets stockés dans le bucket. Voici un exemple :
Les informations concernent le secret nommé kek-ref-FULLY_QUALIFIED_BUCKET_NAME, qui sert de référence pour les clés AEAD par défaut actives. Les AEADKeys actives par défaut sont sélectionnées de manière aléatoire pour chiffrer les objets importés dans le bucket lorsqu'aucune AEADKey spécifique n'est spécifiée.
Une fois que vous avez créé un bucket, vous pouvez le gérer au nom des opérateurs d'application (AO) en créant un fichier de règles lorsque vous accordez l'accès au bucket et en attribuant la règle à un bucket.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eThis page details how to create Google Distributed Cloud (GDC) air-gapped storage buckets, which must be unique within a project and adhere to specific naming conventions.\u003c/p\u003e\n"],["\u003cp\u003eCreating a bucket requires a project namespace and appropriate bucket permissions, with the bucket being automatically encrypted using either \u003ccode\u003ev1\u003c/code\u003e or the recommended default \u003ccode\u003ev2\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eBuckets can be created either through the Console interface, where you specify the bucket name and other attributes, or using the command-line interface (CLI) by applying a bucket specification YAML file.\u003c/p\u003e\n"],["\u003cp\u003eOnce a bucket is created, its status can be verified by checking if the state changes from \u003ccode\u003eNot ready\u003c/code\u003e to \u003ccode\u003eReady\u003c/code\u003e and by examining the encryption details within its status section, which includes the key reference.\u003c/p\u003e\n"],["\u003cp\u003eThe management of the created bucket can also be done, by creating a policy file when granting bucket access and assigning it.\u003c/p\u003e\n"]]],[],null,["# Create storage buckets\n\nThis page guides you through how to create a storage bucket for your Google Distributed Cloud (GDC) air-gapped projects. It covers prerequisites, creation and verification steps, and naming guidelines. This helps you establish compliant and well-configured object storage that meets the needs of your isolated deployments.\n\nThis page is for audiences such as IT admins within the infrastructure operator group or developers within the application operator group who are looking to provision and manage object storage buckets for projects within GDC air-gapped environments. For more information, see [Audiences for GDC air-gapped documentation](/distributed-cloud/hosted/docs/latest/gdch/resources/audiences).\n\nBefore you begin\n----------------\n\nA project namespace manages bucket resources in the Management API server. You\nmust have a [project](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/project-management) to work with buckets and objects.\n\nYou must also have the appropriate bucket permissions to perform the following\noperation. See [Grant bucket access](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/grant-obtain-storage-access#grant_bucket_access).\n\nStorage bucket naming guidelines\n--------------------------------\n\nBucket names must adhere to the following naming conventions:\n\n- 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.\n- Refrain from including any personally identifiable information (PII).\n- Be DNS-compliant.\n- Have at least 1 and no more than 55 characters.\n- Start with a letter and use only letters, numbers, and hyphens.\n\nCreate a bucket\n---------------\n\n**Note:** The bucket that is created will be automatically encrypted with either version `v1` or `v2`. `v2` will be the default if the `encryption-version` label is not specified since `v2` bucket is strongly recommended as it has better encryption and security. `v1` is only recommended if you need higher performance for many small objects. \n\n### Console\n\n1. In the navigation menu, click **Object Storage**.\n2. Click **Create Bucket**.\n3. In the bucket creation flow, assign a name unique across all buckets within the project.\n4. Enter a description.\n5. Optional: Click the toggle_off toggle to set a retention policy and enter your preferred number of days. Contact your IO if you need to exceed retention policy limits.\n6. Click **Create** . A success message appears and you are directed back to the **Buckets** page.\n\nTo verify that you have successfully created a new bucket, refresh the **Buckets** page after a few minutes and check that the bucket state updates from `Not ready` to `Ready`.\n\n### CLI\n\nTo create a bucket, apply a bucket specification to your project namespace: \n\n kubectl apply -f bucket.yaml\n\nThe following is an example of a bucket specification: \n\n apiVersion: object.gdc.goog/v1\n kind: Bucket\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eBUCKET_NAME\u003c/span\u003e\u003c/var\u003e\n namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eNAMESPACE_NAME\u003c/span\u003e\u003c/var\u003e\n spec:\n description: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eDESCRIPTION\u003c/span\u003e\u003c/var\u003e\n storageClass: Standard\n bucketPolicy:\n lockingPolicy:\n defaultObjectRetentionDays: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eRETENTION_DAY_COUNT\u003c/span\u003e\u003c/var\u003e\n\nThe following is an example of a bucket specification with encryption version as `v1`: \n\n apiVersion: object.gdc.goog/v1\n kind: Bucket\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eBUCKET_NAME\u003c/span\u003e\u003c/var\u003e\n namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eNAMESPACE_NAME\u003c/span\u003e\u003c/var\u003e\n labels:\n object.gdc.goog/encryption-version: v1\n spec:\n description: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eDESCRIPTION\u003c/span\u003e\u003c/var\u003e\n storageClass: Standard\n bucketPolicy:\n lockingPolicy:\n defaultObjectRetentionDays: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eRETENTION_DAY_COUNT\u003c/span\u003e\u003c/var\u003e\n\nFor more details, see the [Bucket API reference](../../apis/storage-krm-api.md).\n\nThe following is an example of a dual-zone bucket in org-admin global API: \n\n apiVersion: object.global.gdc.goog/v1\n kind: Bucket\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eBUCKET_NAME\u003c/span\u003e\u003c/var\u003e\n namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003ePROJECT_NAME\u003c/span\u003e\u003c/var\u003e\n spec:\n location: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eLOCATION_NAME\u003c/span\u003e\u003c/var\u003e\n description: Sample DZ Bucket\n storageClass: Standard\n\nNote that only V2 encryption is supported for dual-zone buckets and all operations for creating, updating, or deleting a dual-zone bucket resource must be performed against the global API server.\n\n### gdcloud\n\nTo create a bucket with gdcloud, follow [gdcloud storage buckets create](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-reference/gdcloud-storage-buckets-create).\n\nVerify bucket and related resource creation\n-------------------------------------------\n\nOnce the bucket is created, you can run the following command to confirm and check the details of the bucket: \n\n kubectl describe buckets \u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e -n \u003cvar translate=\"no\"\u003eNAMESPACE_NAME\u003c/var\u003e\n\nThe **Status** section has two important fields: **Encryption** (for encryption details) and **Fully Qualified Name** (which contains the \u003cvar translate=\"no\"\u003eFULLY_QUALIFIED_BUCKET_NAME\u003c/var\u003e). \n\n### Encryption v1\n\nThe information is about the AEADKey named as `obj-`\u003cvar translate=\"no\"\u003eFULLY_QUALIFIED_BUCKET_NAME\u003c/var\u003e, which serves as a reference to the encryption key employed for encrypting objects stored within the bucket. Here is an example: \n\n Status:\n Encryption:\n Key Ref:\n Kind: AEADKey\n Name: obj-\u003cvar translate=\"no\"\u003eFULLY_QUALIFIED_BUCKET_NAME\u003c/var\u003e\n Namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eNAMESPACE_NAME\u003c/span\u003e\u003c/var\u003e\n Type: CMEK\n\n### Encryption v2\n\nThe information pertains to the Secret named as `kek-ref-`\u003cvar translate=\"no\"\u003eFULLY_QUALIFIED_BUCKET_NAME\u003c/var\u003e, which acts as a reference for active default AEADKeys. Active default AEADKeys are randomly selected from to encrypt objects uploaded to the bucket when specific AEADKey is not specified.\n| **Note:** Inactive default AEADKeys are those that are no longer referenced in the Secret. See the Manage Encryption Resources section for more info.\n\nHere is an example: \n\n Status:\n Encryption:\n Key Ref:\n Kind: Secret\n Name: kek-ref-\u003cvar translate=\"no\"\u003eFULLY_QUALIFIED_BUCKET_NAME\u003c/var\u003e\n Namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eNAMESPACE_NAME\u003c/span\u003e\u003c/var\u003e\n Type: CMEK\n\nYou can also run the following command to verify needed AEADKeys are created: \n\n kubectl get aeadkeys -n \u003cvar translate=\"no\"\u003eNAMESPACE_NAME\u003c/var\u003e -l cmek.security.gdc.goog/resource-name=\u003cvar translate=\"no\"\u003eFULLY_QUALIFIED_BUCKET_NAME\u003c/var\u003e\n\nAfter creating a bucket, you can manage it on behalf of Application Operators (AOs) by creating a policy file when granting bucket access and assign the policy to a bucket."]]