Criar um cluster para executar cargas de trabalho de contêiner
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Crie um cluster de usuário para permitir a implantação de carga de trabalho de contêiner.
Antes de começar
Para receber as permissões necessárias para criar um cluster de usuário, peça ao administrador do IAM da organização para conceder a você o papel de administrador do cluster de usuário (papel user-cluster-admin).
Criar um cluster de usuário
Para receber as permissões necessárias para criar um cluster de usuário, peça ao
administrador do IAM para conceder a você o papel de administrador do cluster de usuário (papel user-cluster-admin).
Siga estas etapas para criar um cluster de usuário:
Console
No menu de navegação, selecione Clusters.
Clique em Criar cluster.
No campo Nome, especifique um nome para o cluster de usuário.
Selecione a versão do cluster do GDC. Cada versão é mapeada para uma versão diferente do Kubernetes.
Clique em Próxima.
Configure as definições de rede do cluster. Não é possível mudar essas configurações de rede depois de criar o cluster. O protocolo de Internet padrão e único compatível com clusters de usuários é o protocolo de Internet versão 4 (IPv4).
Se você quiser criar nós de balanceador de carga dedicados, insira o número de nós a serem criados. Por padrão, você recebe zero nós, e o tráfego do balanceador de carga é executado pelos nós de controle.
Selecione o CIDR de serviço (roteamento entre domínios sem classe) a ser usado. Seus serviços implantados, como balanceadores de carga, recebem endereços IP desse intervalo.
Selecione o CIDR do pod a ser usado. O cluster aloca endereços IP desse intervalo para seus pods e VMs.
Clique em Próxima.
Revise os detalhes do pool de nós padrão gerado automaticamente para o cluster de usuário. Clique em editEditar para modificar o pool de nós padrão.
Para criar outros pools de nós, selecione Adicionar pool de nós. Ao editar o pool de nós padrão ou adicionar um novo, personalize-o com as seguintes opções:
Atribua um nome ao pool de nós. Não é possível modificar o nome depois de
criar o pool de nós.
Especifique o número de nós de trabalho a serem criados no pool de nós.
Selecione a classe de máquina mais adequada para os requisitos da sua carga de trabalho.
Confira a lista das seguintes configurações:
Tipo de máquina
CPU
Memória
Clique em Salvar.
Clique em Criar para criar o cluster de usuário.
API
Para criar um cluster de usuário usando a API diretamente, aplique um recurso personalizado
à sua instância do GDC:
Crie um recurso personalizado Cluster e salve-o como um arquivo YAML, como
cluster.yaml:
CLUSTER_NAME: o nome do cluster. O nome do cluster não pode terminar com -system. O sufixo -system é reservado para clusters criados pelo GDC.
POD_CIDR: o tamanho dos intervalos de rede de que os endereços IP virtuais do pod são alocados. Se não for definido, um valor padrão 21 será usado.
SERVICE_CIDR: o tamanho dos intervalos de rede de que os endereços IP virtuais de serviço são alocados. Se não for definido, um valor padrão 23 será usado.
LOAD_BALANCER_POOL_SIZE: o tamanho dos pools de endereços IP não sobrepostos usados pelos serviços de balanceador de carga. Se não for definido, um valor padrão 20 será usado.
MACHINE_TYPE: o tipo de máquina para os
nós de trabalho do pool de nós. Consulte os
tipos de máquina disponíveis
para saber o que pode ser configurado.
NODE_POOL_NAME: o nome do pool de nós.
NUMBER_OF_WORKER_NODES: o número de nós de trabalho a serem provisionados no pool de nós.
TAINTS: os taints a serem aplicados aos nós deste pool de nós. Esse campo é opcional.
LABELS: os rótulos a serem aplicados aos nós deste pool de nós. Ele contém uma lista de pares de chave-valor. Esse campo é opcional.
Aplique o recurso personalizado à sua instância do GDC:
Suporte a recursos de GPU em um cluster de usuário
O GDC oferece suporte a unidades de processamento gráfico (GPUs) da NVIDIA para clusters de usuários, que executam os dispositivos de GPU como cargas de trabalho do usuário. O suporte a GPU é ativado por padrão para clusters
que têm máquinas de GPU provisionadas. Verifique se o cluster de usuário
aceita dispositivos de GPU antes de usar os Deep Learning Containers. Por exemplo, se você pretende executar Deep Learning Containers, crie um cluster de usuário com pelo menos um nó de GPU.
Os clusters de usuário podem ser criados usando o console ou a API do GDC diretamente.
Provisione máquinas de GPU para que o cluster de usuário seja compatível com cargas de trabalho de GPU nos contêineres associados. Para mais informações, consulte
Criar um cluster de usuário.
Placas de GPU NVIDIA compatíveis
Os clusters do GDC são compatíveis com a GPU NVIDIA A100 PCIe de 80 GB. Para
ativar esse suporte, provisione o tipo de máquina a2-ultragpu-1g-gdc em 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-04 UTC."],[[["\u003cp\u003eTo deploy container workloads, you'll need to create a user cluster, which requires the User Cluster Admin role.\u003c/p\u003e\n"],["\u003cp\u003eUser clusters can be created through the GDC console by selecting a name, version, and configuring network settings like Service CIDR and Pod CIDR.\u003c/p\u003e\n"],["\u003cp\u003eNode pools within a user cluster can be customized by specifying the number of worker nodes, and their machine class.\u003c/p\u003e\n"],["\u003cp\u003eCreating a user cluster via API involves defining a \u003ccode\u003eCluster\u003c/code\u003e custom resource in a YAML file, including details like network ranges, Kubernetes version, and node pool specifications.\u003c/p\u003e\n"],["\u003cp\u003eGDC supports NVIDIA GPUs, specifically the A100 PCIe 80 GB, which requires provisioning the \u003ccode\u003ea2-ultragpu-1g-gdc\u003c/code\u003e machine type within the user cluster.\u003c/p\u003e\n"]]],[],null,["# Create a cluster to run container workloads\n\nCreate a user cluster to allow for container workload deployment.\n\nBefore you begin\n----------------\n\nTo get the permissions needed to create a user cluster, ask your Organization\nIAM Admin to grant you the User Cluster Admin role (`user-cluster-admin` role).\n\nCreate a user cluster\n---------------------\n\nTo get the permissions needed to create a user cluster, ask your\nIAM Admin to grant you the User Cluster Admin role (`user-cluster-admin` role).\n\nComplete the following steps to create a user cluster: \n\n### Console\n\n1. In the navigation menu, select **Clusters**.\n\n2. Click **Create cluster**.\n\n3. In the **Name** field, specify a name for the user cluster.\n\n | **Important:** The cluster name must not end with `-system`. The `-system` suffix is reserved for clusters created by GDC.\n4. Select the GDC cluster version. Each version maps to\n a distinct Kubernetes version.\n\n5. Click **Next**.\n\n6. Configure the network settings for your cluster. You can't change these\n network settings after you create the cluster. The default and only\n supported Internet Protocol for user clusters is Internet Protocol version 4\n (IPv4).\n\n 1. If you want to create dedicated *load balancer nodes*, enter the number\n of nodes to create. By default, you receive zero nodes, and load\n balancer traffic runs through the control nodes.\n\n 2. Select the **Service CIDR** (Classless Inter-Domain Routing) to use. Your\n deployed services, such as load balancers, are allocated IP addresses\n from this range.\n\n | **Important:** The range can be any RFC 1918 range that doesn't conflict with other IP address ranges in the cluster and node pool resources. See [RFC 1918](https://tools.ietf.org/html/rfc1918) for more information, but note that you must connect to the internet to access the URL. This URL provides access outside of your air-gapped environment.\n 3. Select the **Pod CIDR** to use. The cluster allocates IP addresses from\n this range to your pods and VMs.\n\n 4. Click **Next**.\n\n7. Review the details of the auto-generated default node pool for the user\n cluster. Click *edit* **Edit** to modify the\n default node pool.\n\n | **Important:** If you intend the user cluster to run graphics processing unit (GPU) workloads, you must provision a GPU machine type in your user cluster. For more information, see [Support GPU workloads in a user cluster](#gpu).\n8. To create additional node pools, select **Add node pool**. When editing the\n default node pool or adding a new node pool, you customize it with the\n following options:\n\n 1. Assign a name for the node pool. You cannot modify the name after you create the node pool.\n 2. Specify the number of worker nodes to create in the node pool.\n 3. Select your machine class that best suits your workload requirements.\n View the list of the following settings:\n\n - Machine type\n - CPU\n - Memory\n 4. Click **Save**.\n\n9. Click **Create** to create the user cluster.\n\n### API\n\nTo create a new user cluster using the API directly, apply a custom resource\nto your GDC instance:\n\n1. Create a `Cluster` custom resource and save it as a YAML file, such as\n `cluster.yaml`:\n\n apiVersion: cluster.gdc.goog/v1\n kind: Cluster\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eCLUSTER_NAME\u003c/span\u003e\u003c/var\u003e\n namespace: platform\n spec:\n clusterNetwork:\n podCIDRSize: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003ePOD_CIDR\u003c/span\u003e\u003c/var\u003e\n serviceCIDRSize: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eSERVICE_CIDR\u003c/span\u003e\u003c/var\u003e\n initialVersion:\n kubernetesVersion: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eKUBERNETES_VERSION\u003c/span\u003e\u003c/var\u003e\n loadBalancer:\n ingressServiceIPSize: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eLOAD_BALANCER_POOL_SIZE\u003c/span\u003e\u003c/var\u003e\n nodePools:\n - machineTypeName: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eMACHINE_TYPE\u003c/span\u003e\u003c/var\u003e\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eNODE_POOL_NAME\u003c/span\u003e\u003c/var\u003e\n nodeCount: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eNUMBER_OF_WORKER_NODES\u003c/span\u003e\u003c/var\u003e\n taints: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eTAINTS\u003c/span\u003e\u003c/var\u003e\n labels: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eLABELS\u003c/span\u003e\u003c/var\u003e\n releaseChannel:\n channel: UNSPECIFIED\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e: The name of the cluster. The cluster name must not end with `-system`. The `-system` suffix is reserved for clusters created by GDC.\n - \u003cvar translate=\"no\"\u003ePOD_CIDR\u003c/var\u003e: The size of network ranges from which pod virtual IP addresses are allocated. If unset, a default value `21` is used.\n - \u003cvar translate=\"no\"\u003eSERVICE_CIDR\u003c/var\u003e: The size of network ranges from which service virtual IP addresses are allocated. If unset, a default value `23` is used.\n - \u003cvar translate=\"no\"\u003eKUBERNETES_VERSION\u003c/var\u003e: The Kubernetes version of the cluster, such as `1.26.5-gke.2100`. To list the available Kubernetes versions to configure, see [List available Kubernetes versions for a cluster](#available-kubernetes-versions).\n - \u003cvar translate=\"no\"\u003eLOAD_BALANCER_POOL_SIZE\u003c/var\u003e: The size of non-overlapping IP address pools used by load balancer services. If unset, a default value `20` is used.\n - \u003cvar translate=\"no\"\u003eMACHINE_TYPE\u003c/var\u003e: The machine type for the worker nodes of the node pool. View the [available machine types](/distributed-cloud/hosted/docs/latest/appliance/platform/pa-user/manage-node-pools#available-machine-types) for what is available to configure.\n - \u003cvar translate=\"no\"\u003eNODE_POOL_NAME\u003c/var\u003e: The name of the node pool.\n - \u003cvar translate=\"no\"\u003eNUMBER_OF_WORKER_NODES\u003c/var\u003e: The number of worker nodes to provision in the node pool.\n - \u003cvar translate=\"no\"\u003eTAINTS\u003c/var\u003e: The taints to apply to the nodes of this node pool. This is an optional field.\n - \u003cvar translate=\"no\"\u003eLABELS\u003c/var\u003e: The labels to apply to the nodes of this node pool. It contains a list of key-value pairs. This is an optional field.\n2. Apply the custom resource to your GDC instance:\n\n kubectl apply -f cluster.yaml --kubeconfig \u003cvar translate=\"no\"\u003eADMIN_CLUSTER_KUBECONFIG\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eADMIN_CLUSTER_KUBECONFIG\u003c/var\u003e with the\n org admin cluster's kubeconfig file path.\n\nList available Kubernetes versions for a cluster\n------------------------------------------------\n\nYou can list the available Kubernetes versions in your GDC\ninstance using the `kubectl` CLI: \n\n kubectl get userclustermetadata.upgrade.private.gdc.goog \\\n -o=custom-columns=K8S-VERSION:.spec.kubernetesVersion \\\n --kubeconfig \u003cvar translate=\"no\"\u003eADMIN_CLUSTER_KUBECONFIG\u003c/var\u003e\n\nReplace \u003cvar translate=\"no\"\u003eADMIN_CLUSTER_KUBECONFIG\u003c/var\u003e with the admin\ncluster's kubeconfig file path.\n\nThe output looks similar to the following: \n\n K8S-VERSION\n 1.25.10-gke.2100\n 1.26.5-gke.2100\n 1.27.4-gke.500\n\nSupport GPU resources in a user cluster\n---------------------------------------\n\nGDC provides NVIDIA graphics processing unit (GPU)\nsupport for user clusters, and they run your GPU devices as\nuser workloads. GPU support is enabled by default for clusters\nwho have GPU machines provisioned for them. Ensure that your user cluster\nsupports GPU devices before leveraging Deep Learning Containers. For example, if\nyou intend to run Deep Learning Containers, ensure you create a user cluster\nwith at least one GPU node.\n\nUser clusters can be created using the GDC console or API directly.\nEnsure that you provision GPU machines for your user cluster to support GPU\nworkloads on its associated containers. For more information, see\n[Create a user cluster](#create).\n\nSupported NVIDIA GPU cards\n--------------------------\n\nGDC clusters support the A100 PCIe 80 GB NVIDIA GPU. To\nenable this support, provision the `a2-ultragpu-1g-gdc` machine type in a user\ncluster."]]