Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Die IPAM-API (IP Address Management) verwendet benutzerdefinierte Kubernetes-Ressourcen und basiert auf dem Kubernetes-Ressourcenmodell (Kubernetes Resource Model, KRM). Es verwaltet die Zuweisung von IP-Adressen in einer Google Distributed Cloud (GDC)-Bereitstellung mit Air Gap.
Wenn Sie die IPAM API verwenden möchten, empfehlen wir, die gcloud CLI zu verwenden oder die API direkt mit der kubectl CLI aufzurufen. Wenn Ihre Anwendung Ihre eigenen Bibliotheken zum Aufrufen dieser API verwenden muss, verwenden Sie die folgenden Beispiele und die vollständigen API-Definitionen, um Ihre Anfragen zu erstellen:
Die Variable MANAGEMENT_API_SERVER_ENDPOINT ist der Endpunkt des Management API-Servers.
Mit dem Befehl kubectl proxy können Sie in Ihrem Browser oder mit einem Tool wie curl auf diese URL zugreifen, um das Discovery-Dokument für die IPAM API abzurufen.
Mit dem Befehl kubectl proxy wird ein Proxy zum Kubernetes API-Server auf Ihrem lokalen Computer geöffnet. Nachdem der Befehl ausgeführt wurde, können Sie über die folgenden URLs auf das Dokument zugreifen:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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"]]