[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eThe IPAM API utilizes Kubernetes custom resources and the Kubernetes Resource Model (KRM) to manage IP address allocation in a Google Distributed Cloud (GDC) air-gapped deployment.\u003c/p\u003e\n"],["\u003cp\u003eYou can interact with the IPAM API via the \u003ccode\u003egdcloud\u003c/code\u003e CLI or directly through the \u003ccode\u003ekubectl\u003c/code\u003e CLI, and custom application libraries are also supported by using the provided API definition and examples.\u003c/p\u003e\n"],["\u003cp\u003eThe IPAM APIs are available in two packages, one for zonal deployment (\u003ccode\u003eipam.gdc.goog\u003c/code\u003e) and another for global deployment (\u003ccode\u003eipam.global.gdc.goog\u003c/code\u003e), each with their own API endpoints.\u003c/p\u003e\n"],["\u003cp\u003eThe IPAM API discovery document can be accessed using \u003ccode\u003ekubectl proxy\u003c/code\u003e, providing URLs to explore both the zonal and global IPAM API specifications.\u003c/p\u003e\n"],["\u003cp\u003eExamples of zonal and global \u003ccode\u003eSubnet\u003c/code\u003e custom resources are provided to showcase the API usage and the structure of the spec needed to be defined in those resources.\u003c/p\u003e\n"]]],[],null,["# IP Address Management API overview\n\nThe IP Address Management (IPAM) API uses Kubernetes custom resources and relies\non the Kubernetes Resource Model (KRM). It manages IP address allocation across\na Google Distributed Cloud (GDC) air-gapped deployment.\n\nTo use the IPAM API, we recommend that you use the gdcloud CLI, or\ncall the API directly using the `kubectl` CLI. If your application needs to use\nyour own libraries to call this API, use the following examples and the\nfull API definitions to build your requests:\n\n- [ipam.gdc.goog](/distributed-cloud/hosted/docs/latest/gdch/apis/service/ipam/v1/ipam-v1)\n- [ipam.global.gdc.goog](/distributed-cloud/hosted/docs/latest/gdch/apis/service/ipam/v1/global-ipam-v1)\n\nService endpoint and discovery document\n---------------------------------------\n\nThe IPAM APIs are provided in two packages depending on zonal deployment or\nglobal deployment.\n\nThe API endpoints for the zonal and global IPAM APIs are the following,\nrespectively:\n\n- `https://`\u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER_ENDPOINT\u003c/var\u003e`/apis/ipam.gdc.goog/v1`\n- `https://`\u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER_ENDPOINT\u003c/var\u003e`/apis/ipam.global.gdc.goog/v1`\n\nThe \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER_ENDPOINT\u003c/var\u003e\nvariable is the endpoint of the 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 IPAM API.\nThe `kubectl proxy` command opens up a proxy to the Kubernetes API server on\nyour local machine. After that command is running, you can access the document at\nthe following URLs:\n\n- `http://127.0.0.1:8001/apis/ipam.gdc.goog/v1`\n- `http://127.0.0.1:8001/apis/ipam.global.gdc.goog/v1`\n\nExample custom resources\n------------------------\n\nThe following is an example of a zonal `Subnet` object: \n\n apiVersion: ipam.gdc.goog/v1\n kind: Subnet\n metadata:\n labels:\n ipam.gdc.goog/overlay-network-type: External\n ipam.gdc.goog/category-type: ExternalOverlayNetwork\n name: test-subnet\n namespace: root\n spec:\n type: Root\n ipv4Request:\n cidr: 10.0.0.0/16\n networkSpec:\n staticVLANID: 100\n enableVLANID: true\n enableGateway: true\n\nThe following is an example of a global `Subnet` object for a default VPC root\nCIDR: \n\n apiVersion: ipam.global.gdc.goog/v1\n kind: Subnet\n metadata:\n labels:\n ipam.gdc.goog/vpc: default-vpc\n ipam.gdc.goog/usage: network-root-range\n name: default-vpc-root-cidr\n namespace: platform\n spec:\n ipv4Request:\n cidr: 10.200.0.0/23\n type: Root"]]