Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Um pool de nós é um grupo de nós em um cluster do Kubernetes que têm a mesma
configuração. Os pools de nós usam uma especificação NodePool. Cada nó no pool
tem um rótulo de nó do Kubernetes, que tem o nome do pool de nós como valor.
Por padrão, todos os novos pools de nós executam a mesma versão do Kubernetes que o plano de controle.
Quando você cria um cluster do Kubernetes, o número e o tipo de nós especificados
criam o primeiro pool de nós do cluster. É possível adicionar mais pools de nós de
diferentes tamanhos e tipos ao cluster. Todos os nós de um determinado pool são idênticos entre si.
Os pools de nós personalizados são úteis ao agendar pods que exigem mais recursos
que outros, como mais memória ou espaço em disco local. Use taints de nós se precisar de mais controle sobre o agendamento dos pods.
É possível criar e excluir pools de nós individualmente sem afetar todo o
cluster. Não é possível configurar um único nó em um pool de nós. Todas as mudanças de configuração afetam todos os nós no pool de nós.
É possível redimensionar pools de nós
em um cluster aumentando ou diminuindo a escala do pool. A redução de um pool de nós é um processo automatizado em que você diminui o tamanho do pool, e o sistema do GDC drena e desaloca automaticamente um nó arbitrário. Não é possível selecionar um nó específico para remover ao reduzir um pool de nós.
Antes de começar
Para conferir e gerenciar pools de nós em um cluster do Kubernetes, é preciso ter as seguintes<0x<0A>
Administrador do cluster de usuários (user-cluster-admin)
Leitor de nós do cluster de usuário (user-cluster-node-viewer)
Essas funções não estão vinculadas a um namespace.
Adicione um pool de nós
Ao criar um cluster do Kubernetes no console do GDC, é possível personalizar o pool de nós padrão e criar outros pools antes da inicialização da criação do cluster. Se você precisar adicionar um pool de nós a um cluster do Kubernetes
atual, siga estas etapas:
Console
No menu de navegação, selecione Kubernetes Engine > Clusters.
Clique no cluster na lista. A página Detalhes do cluster é
mostrada.
Selecione Pools de nós > Adicionar pool de nós.
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. As classes de máquina aparecem nas seguintes configurações:
Tipo de máquina
vCPU
Memória
Clique em Salvar.
API
Abra a especificação do recurso personalizado Cluster com a CLI kubectl usando o
editor interativo:
MANAGEMENT_API_SERVER: o caminho kubeconfig do servidor da API zonal em que o cluster do Kubernetes está hospedado. Se você ainda não gerou um arquivo kubeconfig para o servidor da API na zona de destino, consulte Fazer login para mais detalhes.
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.
GPU_PARTITION_SCHEME: o esquema de particionamento de GPU, se você estiver executando cargas de trabalho de GPU. Por exemplo, mixed-2. A GPU não será particionada se esse campo não for definido. Para ver os perfis de
GPU de várias instâncias (MIG) disponíveis, consulte
Perfis de MIG compatíveis.
Salve o arquivo e saia do editor.
Ver pools de nós
Para conferir os pools de nós em um cluster do Kubernetes, siga estas etapas:
Console
No menu de navegação, selecione Kubernetes Engine > Clusters.
Clique no cluster na lista. A página Detalhes do cluster é
mostrada.
Selecione Pools de nós.
A lista de pools de nós em execução no cluster é exibida. Nela, você pode gerenciar os pools de nós do cluster.
API
Confira os pools de nós de um cluster específico do Kubernetes:
A exclusão de um pool de nós exclui os nós e as rotas dele. Esses nós removem e
reprogramam todos os pods em execução neles. Se os pods tiverem seletores de nó específicos,
eles poderão permanecer em uma condição não programável se nenhum outro nó no
cluster cumprir os critérios.
Verifique se você tem pelo menos três nós de trabalho antes de excluir um pool de nós para
garantir que o cluster tenha espaço de computação suficiente para ser executado de maneira eficaz.
Para excluir um pool de nós, siga estas etapas:
Console
No menu de navegação, selecione Kubernetes Engine > Clusters.
Clique no cluster que está hospedando o pool de nós que você quer excluir.
Selecione Pools de nós.
Clique em deleteExcluir ao lado do pool de nós que você quer excluir.
API
Abra a especificação do recurso personalizado Cluster com a CLI kubectl usando o
editor interativo:
MANAGEMENT_API_SERVER: o caminho kubeconfig do servidor da API zonal em que o cluster do Kubernetes está hospedado. Se você ainda não gerou um arquivo kubeconfig para o servidor da API na zona de destino, consulte Fazer login para mais detalhes.
Remova a entrada do pool de nós da seção nodePools. Por exemplo, no snippet a seguir, remova os campos machineTypeName, name e nodeCount:
[[["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\u003eNode pools are groups of identically configured nodes within a Kubernetes cluster, all sharing the same \u003ccode\u003eNodePool\u003c/code\u003e specification and Kubernetes node label.\u003c/p\u003e\n"],["\u003cp\u003eYou can create multiple node pools within a cluster, each with different node sizes and types, which is useful for scheduling pods with specific resource requirements.\u003c/p\u003e\n"],["\u003cp\u003eNode pools can be added, deleted, or resized individually without affecting the entire cluster, and any configuration changes apply to all nodes within the pool.\u003c/p\u003e\n"],["\u003cp\u003eManaging node pools requires specific roles: User Cluster Admin (\u003ccode\u003euser-cluster-admin\u003c/code\u003e) and User Cluster Node Viewer (\u003ccode\u003euser-cluster-node-viewer\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eDeleting a worker node pool removes the nodes and routes to them, potentially leaving pods unschedulable if their node selectors are not met by other nodes.\u003c/p\u003e\n"]]],[],null,["# Manage node pools\n\nA *node pool* is a group of nodes within a Kubernetes cluster that all have the same\nconfiguration. Node pools use a `NodePool` specification. Each node in the pool\nhas a Kubernetes node label, which has the name of the node pool as its value.\nBy default, all new node pools run the same version of Kubernetes as the control\nplane.\n\nWhen you create a Kubernetes cluster, the number of nodes and type of nodes that you\nspecify create the first node pool of the cluster. You can add additional node\npools of different sizes and types to your cluster. All nodes in any given node\npool are identical to one another.\n\nCustom node pools are useful when scheduling pods that require more resources\nthan others, such as more memory or local disk space. You can use node taints if\nyou need more control over scheduling the pods.\n\nYou can create and delete node pools individually without affecting the whole\ncluster. You cannot configure a single node in a node pool. Any configuration\nchanges affect all nodes in the node pool.\n\nYou can [resize node pools](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/cluster#resize-node-pools)\nin a cluster by upscaling or downscaling the pool. Downscaling a node pool is an\nautomated process where you decrease the pool size and the\nGDC system automatically drains and evicts an arbitrary\nnode. You cannot select a specific node to remove when downscaling a node pool.\n\nBefore you begin\n----------------\n\nTo view and manage node pools in a Kubernetes cluster, you must have the following\nroles:\n\n- User Cluster Admin (`user-cluster-admin`)\n- User Cluster Node Viewer (`user-cluster-node-viewer`)\n\nThese roles are not bound to a namespace.\n\nAdd a node pool\n---------------\n\nWhen creating a Kubernetes cluster from the GDC console, you\ncan customize the default node pool and create additional node pools before the\ncluster creation initializes. If you must add a node pool to an existing Kubernetes\ncluster, complete the following steps: \n\n### Console\n\n1. In the navigation menu, select **Kubernetes Engine \\\u003e Clusters**.\n2. Click the cluster from the cluster list. The **Cluster details** page is displayed.\n3. Select **Node pools \\\u003e Add node pool**.\n4. Assign a name for the node pool. You cannot modify the name after you create the node pool.\n5. Specify the number of worker nodes to create in the node pool.\n6. Select your machine class that best suits your workload requirements. The machine classes show in the following settings:\n - Machine type\n - vCPU\n - Memory\n7. Click **Save**.\n\n### API\n\n1. Open the `Cluster` custom resource spec with the `kubectl` CLI using the\n interactive editor:\n\n kubectl edit clusters.cluster.gdc.goog/\u003cvar translate=\"no\"\u003eKUBERNETES_CLUSTER_NAME\u003c/var\u003e -n platform \\\n --kubeconfig \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eKUBERNETES_CLUSTER_NAME\u003c/var\u003e: The name of the cluster.\n - \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e: The zonal API server's kubeconfig path where the Kubernetes cluster is hosted. If you have not yet generated a kubeconfig file for the API server in your targeted zone, see [Sign in](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/iam/sign-in#cli) for details.\n2. Add a new entry in the `nodePools` section:\n\n nodePools:\n ...\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 acceleratorOptions:\n gpuPartitionScheme: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eGPU_PARTITION_SCHEME\u003c/span\u003e\u003c/var\u003e\n\n Replace the following:\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/gdch/platform/pa-user/cluster-node-machines#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.\n - \u003cvar translate=\"no\"\u003eGPU_PARTITION_SCHEME\u003c/var\u003e: The GPU partitioning scheme, if you're running GPU workloads. For example, `mixed-2`. The GPU is not partitioned if this field is not set. For available Multi-Instance GPU (MIG) profiles, see [Supported MIG profiles](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/cluster-node-machines#mig-profiles).\n\n | **Note:** You cannot edit node configurations, such as GPU partitioning, after the node pool is created.\n3. Save the file and exit the editor.\n\nView node pools\n---------------\n\nTo view existing node pools in a Kubernetes cluster, complete the following steps: \n\n### Console\n\n1. In the navigation menu, select **Kubernetes Engine \\\u003e Clusters**.\n2. Click the cluster from the cluster list. The **Cluster details** page is displayed.\n3. Select **Node pools**.\n\nThe list of node pools running in the cluster is displayed. You can manage\nthe node pools of the cluster from this page.\n\n### API\n\n- View the node pools of a specific Kubernetes cluster:\n\n kubectl get clusters.cluster.gdc.goog/\u003cvar translate=\"no\"\u003eKUBERNETES_CLUSTER_NAME\u003c/var\u003e -n platform \\\n -o json --kubeconfig \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e | \\\n jq .status.workerNodePoolStatuses\n\n The output is similar to the following: \n\n [\n {\n \"conditions\": [\n {\n \"lastTransitionTime\": \"2023-08-31T22:16:17Z\",\n \"message\": \"\",\n \"observedGeneration\": 2,\n \"reason\": \"NodepoolReady\",\n \"status\": \"True\",\n \"type\": \"Ready\"\n },\n {\n \"lastTransitionTime\": \"2023-08-31T22:16:17Z\",\n \"message\": \"\",\n \"observedGeneration\": 2,\n \"reason\": \"ReconciliationCompleted\",\n \"status\": \"False\",\n \"type\": \"Reconciling\"\n }\n ],\n \"name\": \"worker-node-pool\",\n \"readyNodes\": 3,\n \"readyTimestamp\": \"2023-08-31T18:59:46Z\",\n \"reconcilingNodes\": 0,\n \"stalledNodes\": 0,\n \"unknownNodes\": 0\n }\n ]\n\nDelete a node pool\n------------------\n\nDeleting a node pool deletes the nodes and routes to them. These nodes evict and\nreschedule any pods running on them. If the pods have specific node selectors,\nthe pods might remain in a non-schedulable condition if no other node in the\ncluster satisfies the criteria.\n| **Important:** Control plane node pools and load balancer node pools are critical to a cluster's function and consequently can't be removed from a cluster. You can only delete worker node pools.\n\nEnsure you have at least three worker nodes before deleting a node pool to\nensure your cluster has enough compute space to run effectively.\n\nTo delete a node pool, complete the following steps: \n\n### Console\n\n1. In the navigation menu, select **Kubernetes Engine \\\u003e Clusters**.\n\n2. Click the cluster that is hosting the node pool you want to delete.\n\n3. Select **Node pools**.\n\n4. Click *delete* **Delete** next to the node\n pool to delete.\n\n### API\n\n1. Open the `Cluster` custom resource spec with the `kubectl` CLI using the\n interactive editor:\n\n kubectl edit clusters.cluster.gdc.goog/\u003cvar translate=\"no\"\u003eKUBERNETES_CLUSTER_NAME\u003c/var\u003e -n platform \\\n --kubeconfig \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eKUBERNETES_CLUSTER_NAME\u003c/var\u003e: The name of the cluster.\n - \u003cvar translate=\"no\"\u003eMANAGEMENT_API_SERVER\u003c/var\u003e: The zonal API server's kubeconfig path where the Kubernetes cluster is hosted. If you have not yet generated a kubeconfig file for the API server in your targeted zone, see [Sign in](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/iam/sign-in#cli) for details.\n2. Remove the node pool entry from the `nodePools` section. For example, in\n the following snippet, you must remove the `machineTypeName`, `name`, and\n `nodeCount` fields:\n\n nodePools:\n ...\n - machineTypeName: n2-standard-2-gdc\n name: nodepool-1\n nodeCount: 3\n\n Be sure to remove all fields for the node pool you are deleting.\n3. Save the file and exit the editor."]]