Artifact Registry API 使用 Kubernetes 自訂資源,並依賴 Kubernetes 資源模型 (KRM)。這個 API 可用來查看及管理 Harbor 容器登錄執行個體。
服務端點和探索文件
Artifact Registry API 的 API 端點為:
https://MANAGEMENT_API_SERVER_ENDPOINT/apis/artifactregistry.gdc.goog/v1
其中 MANAGEMENT_API_SERVER_ENDPOINT 是 Management API 伺服器的端點。
使用 kubectl proxy 指令,您可以在瀏覽器中存取該網址,也可以使用 curl 等工具,取得 Artifact Registry API 的探索文件。kubectl proxy 指令會在您的本機電腦上開啟 Kubernetes API 伺服器的 Proxy。執行該指令後,您可以在下列網址存取文件:http://127.0.0.1:8001/apis/artifactregistry.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 (世界標準時間)。"],[[["\u003cp\u003eThe Artifact Registry API utilizes Kubernetes custom resources and the Kubernetes Resource Model (KRM) for managing Harbor container registry instances.\u003c/p\u003e\n"],["\u003cp\u003eThe API endpoint for the Artifact Registry is located at \u003ccode\u003ehttps://\u003c/code\u003e\u003cvar translate=no\u003eMANAGEMENT_API_SERVER_ENDPOINT\u003c/var\u003e\u003ccode\u003e/apis/artifactregistry.gdc.goog/v1\u003c/code\u003e, with the specific endpoint determined by the Management API server.\u003c/p\u003e\n"],["\u003cp\u003eYou can access the API's discovery document by using \u003ccode\u003ekubectl proxy\u003c/code\u003e and then navigating to \u003ccode\u003ehttp://127.0.0.1:8001/apis/artifactregistry.gdc.goog/v1\u003c/code\u003e in your browser or through a tool like \u003ccode\u003ecurl\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAn example Harbor container registry instance is illustrated, which shows the relevant API version, kind, name, and namespace.\u003c/p\u003e\n"]]],[],null,["# Artifact Registry API overview\n\nThe Artifact Registry API uses Kubernetes custom resources and relies on the Kubernetes\nResource Model (KRM). This API is used to view and manage Harbor container registry instances.\n\nService endpoint and discovery document\n---------------------------------------\n\nThe API endpoint for the Artifact Registry API is:\n`https://`\u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER_ENDPOINT\u003c/var\u003e`/apis/artifactregistry.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\nwith a tool such as `curl` to get the discovery document for the Artifact Registry 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 URL: `http://127.0.0.1:8001/apis/artifactregistry.gdc.goog/v1`.\n\nExample Harbor container registry instance\n------------------------------------------\n\nThe following is an example of a Harbor container registry instance: \n\n apiVersion: artifactregistry.gdc.goog/v1\n kind: HarborInstance\n metadata:\n name: myinstance\n namespace: tenant-project-namespace"]]