Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
L'API IP Address Management (IPAM) utilizza risorse personalizzate di Kubernetes e si basa
sul modello di risorse Kubernetes (KRM). Gestisce l'allocazione degli indirizzi IP in un deployment con air gap di Google Distributed Cloud (GDC).
Per utilizzare l'API IPAM, ti consigliamo di utilizzare gcloud CLI o
chiamare l'API direttamente utilizzando l'interfaccia a riga di comando kubectl. Se la tua applicazione deve utilizzare
le tue librerie per chiamare questa API, utilizza gli esempi seguenti e le
definizioni complete dell'API per creare le tue richieste:
La variabile MANAGEMENT_API_SERVER_ENDPOINT
è l'endpoint del server dell'API Management.
Utilizzando il comando kubectl proxy, puoi accedere a questo URL nel browser o
con uno strumento come curl per ottenere il documento di rilevamento per l'API IPAM.
Il comando kubectl proxy apre un proxy al server API Kubernetes sulla tua macchina locale. Una volta eseguito il comando, puoi accedere al documento ai seguenti URL:
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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"]]