The IP Address Management (IPAM) API uses Kubernetes custom resources and relies on the Kubernetes Resource Model (KRM). It manages IP address allocation across a Google Distributed Cloud (GDC) air-gapped appliance deployment.
To use the IPAM API, we recommend that you use the 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 definition to build your
requests.
Service endpoint and discovery document
The following URL is the API endpoint for the IPAM KRM API:
https://MANAGEMENT_API_SERVER_ENDPOINT/apis/ipam.gdc.goog/v1
Replace MANAGEMENT_API_SERVER_ENDPOINT
with the endpoint of the
Management API server.
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 IPAM 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 document at
the following URL: http://127.0.0.1:8001/apis/ipam.gdc.goog/v1
.
Example custom resources
The following is an example of a Subnet
object:
apiVersion: ipam.gdc.goog/v1
kind: Subnet
metadata:
labels:
ipam.gdc.goog/overlay-network-type: External
ipam.gdc.goog/category-type: ExternalOverlayNetwork
name: test-subnet
namespace: root
spec:
type: Root
ipv4Request:
cidr: 10.0.0.0/16
networkSpec:
staticVLANID: 100
enableVLANID: true
enableGateway: true