This document explains how node pools work in Google Kubernetes Engine (GKE). A
*node pool* is a group of [nodes](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture.md.txt#nodes) within a Standard cluster that all
have the same configuration. In GKE Standard mode, you
can choose from a number of options for your node pools to meet your workload
needs. If you choose to use Autopilot, you don't need to configure node
pools: GKE manages the nodes for you, although you can manually
upgrade Autopilot-managed node pools in Standard clusters if
needed.

To learn more about creating Standard mode clusters, see [Create a
regional cluster](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/creating-a-regional-cluster)
and [Create a zonal
cluster](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/creating-a-zonal-cluster). To learn how
to manage node pools in existing Standard clusters, see [Adding and
managing node pools](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-pools).

## Overview

A node pool is a group of [nodes](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture.md.txt#nodes) within a cluster that all have the same
configuration. Node pools use a [NodeConfig](https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1/NodeConfig.md.txt) specification. Each node in the
pool has a Kubernetes node label, `cloud.google.com/gke-nodepool`, which has the
node pool's name as its value.

When you create a Standard mode [cluster](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture.md.txt), the number of nodes and type
of nodes that you specify are used to create the first node pool of the cluster,
unless you configure the cluster to skip creating the default node pool.
By default, this first node pool (known as the *default node pool* or
`default-pool`) consists of
three nodes in each of the cluster's compute zones, with the default [node
image](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/node-images) `cos_containerd`, and a general-purpose [machine
type](https://docs.cloud.google.com/compute/docs/machine-types). You can specify a variety of properties for
the node pool, depending on your workload requirements. For example, you might
create a node pool in your cluster with [local SSDs](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/local-ssd.md.txt), a [minimum CPU platform](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/min-cpu-platform.md.txt),
[Spot VMs](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/spot-vms.md.txt), a different node
image, different [machine types](https://docs.cloud.google.com/compute/docs/machine-types), or a more efficient [virtual network
interface](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/using-gvnic).

In GKE version 1.37.1-gke.1153000 and later, you can also
create a Standard cluster that has no node pools or that has an empty
node pool, as follows:

- **No node pools** : if you specify the `--num-nodes=0` flag when you create a cluster by using the gcloud CLI, then GKE doesn't add any node pools to the cluster. You can't specify node configuration flags like the `--machine-type` flag when you use this method.
- **Empty node pool** : if you specify the `--num-nodes=0` flag and the `--node-pool-name` flag when you create a cluster by using the gcloud CLI, then GKE creates an empty node pool that has the specified name. You can specify node configuration flags like the `--machine-type` flag when you use this method.

For more information, see
[Create a regional cluster without a default node pool or with an empty default node
pool](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/creating-a-regional-cluster#create-cluster-zero-nodes)
or
[Create a zonal cluster without a default node pool or with an empty default
node
pool](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/creating-a-zonal-cluster#create-cluster-zero-nodes).

After cluster creation, you can add more node pools of different sizes and types
to your cluster. All nodes in any given node pool are identical to one another.

Custom node pools are useful when you need to schedule Pods that require more
resources than others, such as more memory or more local disk space. If you need
more control of where Pods are scheduled, you can use [node taints](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/).

You can [create, upgrade, and delete node
pools](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-pools) individually without affecting
the whole cluster. You cannot configure a single node in a node pool; any
configuration changes affect all nodes in the node pool.

You can resize node pools in a cluster by [adding or removing
nodes](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-pools#resizing_a_node_pool).

By default, all new node pools run the same version of Kubernetes as the control
plane. Existing node pools can be [manually upgraded](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/upgrading-a-container-cluster#manually_upgrading_your_nodes) or [automatically
upgraded](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/node-auto-upgrade). You can also run multiple Kubernetes node versions on each node pool
in your cluster, upgrade each node pool independently, and target different node
pools for specific deployments.

### Autopilot-managed node pools

In Standard clusters, in addition to the Standard node pools
described in this document, you can also have Autopilot-managed node
pools, which are created and managed by GKE for
Autopilot ComputeClasses. For more information, see [About
Autopilot mode workloads in GKE
Standard](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/about-autopilot-mode-standard-clusters).

You can [manually
upgrade](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/upgrading-a-cluster#upgrade_nodes) this
type of node pool. However, you can't perform [other types of
updates](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/managing-clusters#upgrades-updates)
beyond upgrades (version changes). You also can't [delete the node
pool](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/node-pools#drain).

## Deploying Services to specific node pools

When you define a
[Service](https://kubernetes.io/docs/concepts/services-networking/service/), you
can indirectly control which node pool it is deployed into. The node pool is
*not* dependent on the configuration of the Service, but on the configuration of
the [Pod](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/pod).

- You can explicitly deploy a Pod to a specific node pool by setting a
  [`nodeSelector`](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/)
  in the Pod manifest. This forces a Pod to run only on nodes in that node pool.
  For an example see, [Deploying a Pod to a specific node
  pool](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-pools#deploy).

- You can [specify resource requests for the
  containers](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/).
  The Pod only runs on nodes that satisfy the resource requests. For example,
  if the Pod definition includes a container that requires four CPUs, the
  Service does not select Pods running on nodes with two CPUs.

## Nodes in multi-zonal clusters

If you created a
[multi-zonal](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/types-of-clusters#multi-zonal_clusters)
cluster, all of the node pools are replicated to those zones automatically. Any
new node pool is automatically created in those zones. Similarly, any deletions
delete those node pools from the additional zones as well.

Note that because of this multiplicative effect, this may consume more of your
project's [quota](https://docs.cloud.google.com/kubernetes-engine/quotas.md.txt) for a specific region when creating
node pools.

## Deleting node pools

When you [delete a node
pool](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-pools#deleting_a_node_pool),
GKE drains all the nodes in the node pool, deleting and
rescheduling all Pods. The draining process involves GKE deleting
Pods on each node in the node pool. GKE does both of the
following when deleting nodes:

- GKE drains each node in a node pool by deleting Pods with an allotted graceful termination period of `MAX_POD`. `MAX_POD` is the maximum [`terminationGracePeriodSeconds`](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination) set on the Pods scheduled on the node, with a cap of one hour.
- GKE, by default, doesn't honor [`PodDisruptionBudget`](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) (PDB) settings during node pool deletion. However, you can update the configuration of the node pool to have GKE respect PDBs during node pool deletion, also with a cap of one hour. Respecting PDBs gives workloads the opportunity to move to other nodes in the cluster. For more information about configuring this setting, see [Update a node pool to
  respect PDBs during node pool
  deletion](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-pools#respect-pdb-delete).

If the Pods have specific node selectors, the Pods might remain in an
unschedulable condition if no other node in the cluster satisfies the criteria.

> [!WARNING]
> **Warning:** If you create a cluster that has zero nodes, delete all node pools, or scale the cluster to zero nodes, then system Pods remain in a `Pending` state until at least one node exists in the cluster. When you run workloads in your cluster, ensure that at least one node pool has no custom `NoSchedule` or `NoExecute` taints, so that system Pods can run. Failure to schedule `kube-system` Pods while workloads run might cause DNS resolution failures and control plane communication problems.

When a cluster is deleted, GKE does not follow this process of
gracefully terminating the nodes by draining them. If the workloads running on a
cluster must be gracefully terminated, use [`kubectl
drain`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#drain)
to clean up the workloads before you delete the cluster.

To delete a node pool, see [Delete a node
pool](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-pools#deleting_a_node_pool). You can't
delete [Autopilot-managed node pools](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/node-pools.md.txt#autopilot-node-pools).

## What's next

- [Learn about the cluster architecture in
  GKE](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
  - [Learn how to add and manage node pools](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-pools.md.txt).
- [Learn how to auto-provision
  nodes](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning).