对象存储 API 使用 Kubernetes 自定义资源,并依赖于 Kubernetes 资源模型。这些 API 用于预配和管理对象存储资源。这些角色用于管理组织中对象存储资源的生命周期,包括创建、读取、更新和删除存储分区。这些 API 还用于列出、设置保留政策以及设置存储桶和存储桶级访问权限控制的存储类别。
服务端点和发现文档
以下网址是对象存储 API 的 API 端点:https://MANAGEMENT_API_SERVER_ENDPOINT/apis/object.gdc.goog/v1,其中 MANAGEMENT_API_SERVER_ENDPOINT 是管理 API 服务器的 API 端点。
使用 kubectl proxy 命令,您可以在浏览器中或使用 curl 等工具访问该网址,以获取对象存储 API 的 Discovery 文档。kubectl proxy 命令会在本地计算机上打开一个指向 Kubernetes API 服务器的代理。该命令运行后,请访问以下网址中的文档:http://127.0.0.1:8001/apis/object.gdc.goog/v1。
S3 REST API 概览
软件定义存储
提供与 Amazon S3 API 兼容的对象存储 API。Google Distributed Cloud (GDC) 空气隔离设备对象存储 XML API 是一种 RESTful 接口,可让您以程序化方式管理对象存储数据。作为 RESTful API,它依赖于方法信息和范围信息来定义要执行的操作:
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eThe Object Storage API, which includes KRM and S3 REST API sections, manages the lifecycle of object storage resources, using Kubernetes custom resources for provisioning and administration.\u003c/p\u003e\n"],["\u003cp\u003eThe API endpoint for Object Storage is located at \u003ccode\u003ehttps://ADMIN_CLUSTER_KUBERNETES_API_ENDPOINT/apis/object.gdc.goog/v1alpha1\u003c/code\u003e, which can be accessed through \u003ccode\u003ekubectl proxy\u003c/code\u003e to view the discovery document.\u003c/p\u003e\n"],["\u003cp\u003eThe S3 REST API enables programmatic management of object storage data, utilizing HTTP methods (DELETE, GET, HEAD, PUT) and scoping parameters like bucket and object names.\u003c/p\u003e\n"],["\u003cp\u003eBlock storage in GDC is managed through standard Kubernetes storage APIs and supports a single storage class, \u003cem\u003estandard-rwo\u003c/em\u003e, as demonstrated by the example persistent volume claim provided.\u003c/p\u003e\n"]]],[],null,["# Storage API overview\n\n| **Important:** To access the URLs on this page, you must connect to the internet. The URLs are provided for use when you have such access.\n\nObject storage\n--------------\n\nThe Object Storage API includes Kubernetes Resource Model (KRM) and S3 REST API sections. Block storage is managed with standard Kubernetes storage API (\u003chttps://kubernetes.io/docs/concepts/storage/\u003e).\n\nThe Object Storage API uses Kubernetes custom resources and relies on the Kubernetes Resource Model. The APIs are used for provisioning and administration of object storage resources. They are used to manage the lifecycle of object storage resources in the organization, including creating, reading, updating, and deleting buckets. The APIs are also used for listing, setting retention policies, and setting the storage class of buckets and bucket-level access control.\n\n### Service endpoint and discovery document\n\nThe following URL is the API endpoint for the Object Storage APIs:\n`https://`\u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER_ENDPOINT\u003c/var\u003e`/apis/object.gdc.goog/v1` where \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER_ENDPOINT\u003c/var\u003e is the API endpoint of your Management API server.\n\nUsing the `kubectl proxy` command, you can access that URL in your browser or\nwith a tool such as `curl` to get the discovery document for the Object Storage\nAPI. The `kubectl proxy` command opens up a proxy to the Kubernetes API server\non your local machine. After that command is running, access the document at the\nfollowing URL: `http://127.0.0.1:8001/apis/object.gdc.goog/v1`.\n\n### S3 REST API overview\n\nSoftware-defined storage provides the Object Storage API compatible with the Amazon S3 API. The Google Distributed Cloud (GDC) air-gapped appliance Object Storage XML API is a RESTful interface that lets you to manage object storage data in a programmatic way. As a RESTful API, it relies on method information and scoping information to define the operations to perform:\n\n\u003cbr /\u003e\n\n- **Method information**. You specify the method information with standard HTTP methods, such as DELETE, GET, HEAD, and PUT.\n- **Scoping information**. You specify the scoping information with an accessible endpoint (URI) and various scoping parameters. For the XML API, the primary scoping parameters are the bucket and object names. Further scope your operations by using HTTP headers and query string parameters.\n\nBlock storage\n-------------\n\n### Volume storage API overview\n\nInteraction with storage within GDC occurs entirely using the Kubernetes storage primitives. To create persistent volumes, follow the documentation (\u003chttps://kubernetes.io/docs/concepts/storage/persistent-volumes/\u003e) by Kubernetes.\n\nHere is an example of a persistent volume claim: \n\n apiVersion: v1\n kind: PersistentVolumeClaim\n metadata:\n name: my_volume\n spec:\n accessModes:\n - ReadWriteOnce\n volumeMode: Filesystem\n resources:\n requests:\n storage: 1Gi\n storageClassName: standard-rwo"]]