Node Pools

This page provides an overview of Node Pools, and how to use them with Google Container Engine.

Introduction

A node pool is a subset of machines within a cluster that all have the same configuration.

While all nodes in a container cluster are identical, node pools let you create pools of machines within your cluster that have different configurations. For example, you might create a pool of nodes in your cluster that have local SSDs or larger instance sizes.

Node pools are useful for customizing the instance profile in your cluster. You can also run multiple Kubernetes node versions on each node pool in your cluster, update each node pool independently, and target different node pools for specific deployments.

Creating a node pool

The create call takes a NodeConfig JSON file and creates a pool of machines with it. Each node in the pool has a Kubernetes node label with the node pool's name in the key cloud.google.com/gke-nodepool.

Console

To add a node pool to a project in the Cloud Platform Console, go to the Container clusters page and edit a cluster. On the edit screen, you should see an + Add node pool button.

Node pool add button example

gcloud

You create a node pool by using the gcloud container node-pools command:

gcloud container node-pools create NAME --zone ZONE --cluster CLUSTER

Optional flags:

For the full list of options, see gcloud container node-pools create.

A successful node-pools create request returns the node pool information:

Creating node pool example-pool...done.
Created [https://container.googleapis.com/v1/projects/container-engine-docs/zones/us-central1-f/clusters/example-cluster/nodePools/example-pool].
NAME          MACHINE_TYPE   DISK_SIZE_GB  NODE_VERSION
  example-pool  n1-standard-1  100           1.2.4

Viewing the node pools of a cluster

Console

To view the node pools of a cluster in Cloud Developers Console, go to the Container clusters page, and click the name of any existing clusters in your project. The node pool details are listed under the Node Pools heading.

gcloud

To view a particular node pool in a cluster, use the gcloud node-pools describe command:

gcloud container node-pools describe [NAME] --zone [ZONE] --cluster [CLUSTER]

To list all the node pools of a cluster, use the gcloud node-pools list command:

gcloud container node-pools list --zone [ZONE] --cluster [CLUSTER]

Deleting a node pool

Deleting a node pool deletes the nodes and routes to them. Any Pod running on those nodes are evicted and rescheduled. 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.

To delete a container cluster, use the gcloud node-pools delete command:

gcloud container node-pools delete [NAME] --zone [ZONE] --cluster [CLUSTER]

Multi-zone clusters

If your cluster was created with the --additional-zones option, all of the node pools are replicated to those zones automatically. Any new node pool that is created 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 for a specific region when creating node pools.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Container Engine