Marketplace API 使用 Kubernetes 自定义资源,并依赖于 Kubernetes 资源模型。这些 API 用于通过安装、升级和卸载等操作在给定项目中配置和管理 Marketplace 服务。GDC Marketplace API 还用于查看可用版本、在项目中创建、修改或删除对象,以安装、升级或卸载服务实例。
服务端点和发现文档
以下网址是 Marketplace API 的 API 端点:
https://MANAGEMENT_API_SERVER_ENDPOINT/apis/marketplace.gdc.goog/v1
其中 MANAGEMENT_API_SERVER_ENDPOINT 是 Management API 服务器的端点。
使用 kubectl proxy 命令,您可以在浏览器中或使用 curl 等工具访问该网址,以获取 Marketplace API 的发现文档。
kubectl proxy 命令会在本地机器上打开一个指向 Kubernetes API 服务器的代理。命令运行期间,请访问以下网址中的文档:
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eThe Marketplace API utilizes Kubernetes custom resources and the Kubernetes Resource Model for managing Marketplace services.\u003c/p\u003e\n"],["\u003cp\u003eActions like installing, upgrading, and uninstalling services within a project are facilitated through the Marketplace APIs.\u003c/p\u003e\n"],["\u003cp\u003eThe API endpoint for the Marketplace APIs is located at \u003ccode\u003ehttps://\u003c/code\u003e\u003cvar translate=no\u003eMANAGEMENT_API_SERVER_ENDPOINT\u003c/var\u003e\u003ccode\u003e/apis/marketplace.gdc.goog/v1\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe discovery document for the Marketplace API can be accessed via the \u003ccode\u003ekubectl proxy\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ekubectl create\u003c/code\u003e, \u003ccode\u003ekubectl apply\u003c/code\u003e, \u003ccode\u003ekubectl patch\u003c/code\u003e, \u003ccode\u003ekubectl edit\u003c/code\u003e, and \u003ccode\u003ekubectl delete\u003c/code\u003e commands are used to manage service instances.\u003c/p\u003e\n"]]],[],null,["# Marketplace API overview\n\nThe Marketplace API uses Kubernetes custom resources and relies on the Kubernetes Resource Model. The APIs are used for the provisioning and administration of the Marketplace services in a given project through actions that include installing, upgrading, and uninstalling. The GDC Marketplace APIs are also used to see available versions, create, modify, or delete objects in your project to install, upgrade, or uninstall instances of a service.\n\nService endpoint and discovery document\n---------------------------------------\n\nThe following URL is the API endpoint for the Marketplace APIs:\n`https://`\u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER_ENDPOINT\u003c/var\u003e`/apis/marketplace.gdc.goog/v1`\nwhere \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER_ENDPOINT\u003c/var\u003e is the endpoint of the\nManagement API server.\n\nUsing the `kubectl proxy` command, you can access that URL in your browser or with a tool such as `curl` to get the discovery document for the Marketplace API.\nThe `kubectl proxy` command opens up a proxy to the Kubernetes API server on your local machine. When the command is running, access the document at the following URL:\n\n`http://127.0.0.1:8001/apis/marketplace.gdc.goog/v1`\n\nCreate an object in a project's namespace with `kubectl create` to install the service you want. To upgrade a service instance, modify it to indicate which version of that service. You can modify the object directly with an HTTP client or by using the `kubectl apply`, `kubectl patch`, or `kubectl edit` commands. To uninstall a service instance, delete the object with `kubectl delete`."]]