Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
IP Address Management (IPAM) API menggunakan resource kustom Kubernetes dan mengandalkan
Model Resource Kubernetes (KRM). Layanan ini mengelola alokasi alamat IP di seluruh deployment air gap Google Distributed Cloud (GDC).
Untuk menggunakan IPAM API, sebaiknya gunakan gcloud CLI, atau
panggil API secara langsung menggunakan CLI kubectl. Jika aplikasi Anda perlu menggunakan
library Anda sendiri untuk memanggil API ini, gunakan contoh berikut dan
definisi API lengkap untuk membuat permintaan Anda:
Variabel MANAGEMENT_API_SERVER_ENDPOINT
adalah endpoint server Management API.
Dengan menggunakan perintah kubectl proxy, Anda dapat mengakses URL tersebut di browser atau dengan alat seperti curl untuk mendapatkan dokumen penemuan untuk IPAM API.
Perintah kubectl proxy membuka proxy ke server Kubernetes API di
komputer lokal Anda. Setelah perintah tersebut berjalan, Anda dapat mengakses dokumen di
URL berikut:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[[["\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"]]