Networking API は Kubernetes カスタム リソースを使用し、Kubernetes Resource Model(KRM)に依存しています。
kubectl CLI を使用して Networking API を介して、Google Distributed Cloud(GDC)エアギャップ アプライアンスでネットワークを作成して管理します。
サービス エンドポイント
Networking API の API エンドポイントは https://MANAGEMENT_API_SERVER_ENDPOINT/apis/networking.gdc.goog/v1 です。ここで、MANAGEMENT_API_SERVER_ENDPOINT は Management API サーバーのエンドポイントです。
ディスカバリ ドキュメント
kubectl proxy コマンドを使用して、ローカル マシン上の API サーバーへのプロキシを開きます。ディスカバリ ドキュメントには、次の URL(http://127.0.0.1:8001/apis/networking.gdc.goog/v1)からアクセスできます。
[[["わかりやすい","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 UTC。"],[],[],null,["# Overview of Networking API\n\nThe Networking API uses Kubernetes custom resources and relies on\nthe Kubernetes Resource Model (KRM).\n\nCreate and manage networking in Google Distributed Cloud (GDC) air-gapped appliance through the Networking API using the `kubectl` CLI.\n\nService endpoint\n----------------\n\nThe API endpoint for the Networking API is\n`https://`\u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER_ENDPOINT\u003c/var\u003e`/apis/networking.gdc.goog/v1`,\nwhere \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER_ENDPOINT\u003c/var\u003e is the endpoint of\nthe Management API server.\n\nDiscovery document\n------------------\n\nUse the `kubectl proxy` command to open a proxy to the API server on your local\nmachine. From there, you can access the discovery document at the\nfollowing URL: `http://127.0.0.1:8001/apis/networking.gdc.goog/v1`.\n\nExample ingress cross-project traffic policy\n--------------------------------------------\n\nThe following is an example of a `ProjectNetworkPolicy` object that enables workloads in the `project-1` project to permit connections from workloads in the `project-2` project, as well as the return traffic for the same flows: \n\n apiVersion: networking.gdc.goog/v1\n kind: ProjectNetworkPolicy\n metadata:\n namespace: project-1\n name: allow-ingress-traffic-from-project-2\n spec:\n policyType: Ingress\n subject:\n subjectType: UserWorkload\n ingress:\n - from:\n - projects:\n matchNames:\n - project-2"]]