Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
A API Cluster usa recursos personalizados do Kubernetes e depende do modelo de recursos do Kubernetes (KRM, na sigla em inglês). Ele gerencia o ciclo de vida dos clusters em uma determinada
organização, como instalação, upgrade e desinstalação.
Para usar a API de cluster, recomendamos que você use o console do GDC. Se
o aplicativo precisar usar suas próprias bibliotecas para chamar essa API, use o
exemplo a seguir e a
definição completa da API para criar
suas solicitações.
Endpoint de serviço e documento de descoberta
O endpoint de API do Cluster é
https://MANAGEMENT_API_SERVER_ENDPOINT/apis/cluster.gdc.goog/v1,
em que MANAGEMENT_API_SERVER_ENDPOINT é o endpoint do
servidor da API Management.
Usando o comando kubectl proxy, você pode acessar esse URL no navegador ou
com uma ferramenta como curl para receber o documento de descoberta da API de cluster.
O comando kubectl proxy abre um proxy para o servidor da API Kubernetes na
máquina local. Depois que esse comando estiver em execução, acesse o documento no seguinte URL: http://127.0.0.1:8001/apis/cluster.gdc.goog/v1.
Exemplo de recurso de cluster
Confira a seguir um exemplo de um objeto Cluster configurado como um cluster de usuário:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-02 UTC."],[[["\u003cp\u003eThe Cluster API leverages Kubernetes custom resources and the Kubernetes Resource Model (KRM) to manage cluster lifecycles, including installation, upgrades, and uninstallation.\u003c/p\u003e\n"],["\u003cp\u003eThe recommended method for interacting with the Cluster API is through the GDC console, but custom libraries can also be used by referring to the full API definition.\u003c/p\u003e\n"],["\u003cp\u003eThe Cluster API endpoint is located at \u003ccode\u003ehttps://<MANAGEMENT_API_SERVER_ENDPOINT>/apis/cluster.gdc.goog/v1\u003c/code\u003e, where \u003ccode\u003e<MANAGEMENT_API_SERVER_ENDPOINT>\u003c/code\u003e is the Management API server endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThe discovery document for the Cluster API can be accessed via \u003ccode\u003ekubectl proxy\u003c/code\u003e at \u003ccode\u003ehttp://127.0.0.1:8001/apis/cluster.gdc.goog/v1\u003c/code\u003e after establishing a proxy to the Kubernetes API server.\u003c/p\u003e\n"],["\u003cp\u003eThe example \u003ccode\u003eCluster\u003c/code\u003e resource provided displays a user cluster configuration which includes specifications for the network, initial Kubernetes version, load balancer, node pool, and release channel.\u003c/p\u003e\n"]]],[],null,["# Cluster API overview\n\nThe Cluster API uses Kubernetes custom resources and relies on the Kubernetes\nResource Model (KRM). It manages the lifecycle of clusters in a given\norganization, such as installing, upgrading, and uninstalling.\n\nTo use the Cluster API, we recommend that you use the GDC console. If\nyour application needs to use your own libraries to call this API, use the\nfollowing example and the\n[full API definition](/distributed-cloud/hosted/docs/latest/gdch/apis/service/cluster/v1/cluster-v1) to build\nyour requests.\n\nService endpoint and discovery document\n---------------------------------------\n\nThe API endpoint for the Cluster API is\n`https://`\u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER_ENDPOINT\u003c/var\u003e`/apis/cluster.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 Cluster API.\nThe `kubectl proxy` command opens up a proxy to the Kubernetes API server on\nyour local machine. Once that command is running, you can access the document at\nthe following URL: `http://127.0.0.1:8001/apis/cluster.gdc.goog/v1`.\n\nExample Cluster resource\n------------------------\n\nThe following is an example of a `Cluster` object configured as a user cluster: \n\n apiVersion: cluster.gdc.goog/v1\n kind: Cluster\n metadata:\n name: user-vm-1\n namespace: platform\n spec:\n clusterNetwork:\n podCIDRSize: 21\n serviceCIDRSize: 23\n initialVersion:\n kubernetesVersion: 1.27.1-gke.700\n loadBalancer:\n ingressServiceIPSize: 21\n nodePools:\n - machineTypeName: n2-standard-8-gdc\n name: worker-node-pool\n nodeCount: 3\n releaseChannel:\n channel: UNSPECIFIED"]]