Storage API overview

Object storage

The Object Storage API includes Kubernetes Resource Model (KRM) and S3 REST API sections. Block storage is managed with standard Kubernetes storage API (https://kubernetes.io/docs/concepts/storage/).

The 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.

Service endpoint and discovery document

The following URL is the API endpoint for the Object Storage APIs: https://ADMIN_CLUSTER_KUBERNETES_API_ENDPOINT/apis/object.gdc.goog/v1alpha1 where [ADMIN_CLUSTER_KUBERNETES_API_ENDPOINT] is the API endpoint of your admin Kubernetes cluster.

Using the kubectl proxy command, you can access that URL in your browser or with a tool such as curl to get the discovery document for the Object Storage API. The kubectl proxy command opens up a proxy to the Kubernetes API server on your local machine. After that command is running, access the document at the following URL: http://127.0.0.1:8001/apis/object.gdc.goog/v1alpha1.

S3 REST API overview

Software-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 allows 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:

  • Method information. You specify the method information with standard HTTP methods, such as DELETE, GET, HEAD, and PUT.
  • 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.

Block storage

Volume storage API overview

Interaction with storage within GDC occurs entirely via Kubernetes storage primitives. To create persistent volumes, follow the documentation (https://kubernetes.io/docs/concepts/storage/persistent-volumes/) by Kubernetes. GDC supports a single storage class (https://kubernetes.io/docs/concepts/storage/storage-classes/) of the type standard-rwo which is backed by the Kubernetes block device driver.

Here is an example of a persistent volume claim:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my_volume
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 1Gi
storageClassName: standard-rwo