You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Node pools are groups of nodes within a GKE cluster that share the same configuration — machine type, disk type, OS image, labels, and taints. They give you fine-grained control over the compute resources available to your workloads, allowing you to run different types of workloads on different types of hardware within the same cluster.
A node pool is a set of identically configured Compute Engine VMs. Every GKE cluster has at least one node pool (the default pool), and you can add additional pools with different configurations. Each pool can be independently scaled, upgraded, and configured.
| Use Case | Node Pool Configuration |
|---|---|
| General workloads | e2-standard-4, auto-scaling 1–10 nodes |
| Memory-intensive | n2-highmem-8 for databases and caching |
| GPU workloads | n1-standard-4 with NVIDIA T4 GPU for ML training |
| Spot/preemptible | e2-standard-4 with spot VMs for batch processing |
| Windows containers | Windows Server node pool for .NET applications |
# Create a new node pool
gcloud container node-pools create high-memory-pool \
--cluster my-cluster \
--region europe-west2 \
--machine-type n2-highmem-8 \
--num-nodes 2 \
--enable-autoscaling --min-nodes 1 --max-nodes 5
# Create a GPU node pool
gcloud container node-pools create gpu-pool \
--cluster my-cluster \
--region europe-west2 \
--machine-type n1-standard-4 \
--accelerator type=nvidia-tesla-t4,count=1 \
--num-nodes 0 \
--enable-autoscaling --min-nodes 0 --max-nodes 4
# Create a Spot VM node pool (cost savings up to 91%)
gcloud container node-pools create spot-pool \
--cluster my-cluster \
--region europe-west2 \
--machine-type e2-standard-4 \
--spot \
--enable-autoscaling --min-nodes 0 --max-nodes 20
# List node pools
gcloud container node-pools list --cluster my-cluster --region europe-west2
# Resize a node pool
gcloud container clusters resize my-cluster \
--node-pool default-pool \
--num-nodes 5 \
--region europe-west2
Google Cloud offers several machine type families, each optimised for different workloads:
| Family | Description | Use Cases |
|---|---|---|
| E2 | Cost-optimised, shared-core and standard | Dev/test, small web apps, microservices |
| N2 | Balanced performance, Intel | General workloads, web servers, databases |
| N2D | Balanced performance, AMD | Same as N2, often better price-performance |
| C3 | Latest generation, highest performance | Demanding general-purpose workloads |
| Family | Description | Use Cases |
|---|---|---|
| C2 | Highest per-core performance | Gaming, HPC, single-threaded workloads |
| C2D | AMD EPYC, high core counts | Batch processing, media encoding |
| Family | Description | Use Cases |
|---|---|---|
| M1/M2/M3 | Up to 12 TiB of memory | SAP HANA, large in-memory databases |
| N2-highmem | High memory-to-CPU ratio | Redis, Memcached, analytics |
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.