Resource Manager API overview

The Resource Manager API uses Kubernetes custom resources and relies on the Kubernetes Resource Model (KRM) for provisioning and administration of organization and project resources. It is used to manage the lifecycle of Google Distributed Cloud (GDC) air-gapped organizations and projects, such as installing, upgrading, and uninstalling.

To use the Resource Manager API, we recommend that you use the GDC console, gdcloud CLI, or call the API directly using the kubectl CLI. If your application needs to use your own libraries to call this API, use the following examples and the full API definitions to build your requests:

Service endpoint and discovery document

The Resource Manager APIs are provided in two packages depending on zonal deployment or global deployment.

The API endpoints for the zonal and global Resource Manager APIs are the following, respectively:

  • https://MANAGEMENT_API_SERVER_ENDPOINT/apis/resourcemanager.gdc.goog/v1
  • https://MANAGEMENT_API_SERVER_ENDPOINT/apis/resourcemanager.global.gdc.goog/v1

The API endpoint for the Resource Manager View API is the following:

https://MANAGEMENT_API_SERVER_ENDPOINT/apis/resourcemanagerview.gdc.goog/v1

The MANAGEMENT_API_SERVER_ENDPOINT variable is the endpoint of the Management API server.

Using the kubectl proxy command, you can access the API endpoint URLs in your browser or with a tool such as curl to get the discovery document for the Resource Manager API. The kubectl proxy command opens up a proxy to the Kubernetes API server on your local machine. After that command is running, you can access the documents at the following URLs:

  • http://127.0.0.1:8001/apis/resourcemanager.gdc.goog/v1
  • http://127.0.0.1:8001/apis/resourcemanager.global.gdc.goog/v1
  • http://127.0.0.1:8001/apis/resourcemanagerview.gdc.goog/v1

Example Project resource

The following is an example of a Project object configured as a GDC project resource. As a user of the Resource Manager API, creating a project through the GDC console generates the Project object by default. You must only modify it to reflect the project state you want.

apiVersion: resourcemanager.global.gdc.goog/v1
kind: Project
metadata:
  namespace: platform
  name: test-project