liveBook · Manning

Node pool

As explained in Google Anthos in Action

A node pool is a group of Kubernetes worker nodes managed together with shared configuration and machine characteristics.

A node pool groups worker nodes in a cluster under shared configuration. Pools let a cluster use different machine sizes; in Anthos on Azure, a pool is added after the cluster is created so workloads have nodes on which to run. section 5.2.2 section 5.6.1

The deployment path depends on the platform. GKE on-prem uses an admin cluster, user clusters, and node pools. GKE on AWS represents pools as AWSNodePool custom resources in YAML. Anthos on Azure creates them with gcloud commands. section 5.2.1 section 5.2.2 section 5.6.1

apiVersion: multicloud.cluster.gke.io/v1
kind: AWSNodePool
metadata:
name: cluster-0-pool-0
spec:
clusterName: cluster-0
version: 1.20.10-gke.600
minNodeCount: 3
maxNodeCount: 10

An AWSNodePool manifest associates a pool with a cluster and sets its version and minimum and maximum node counts. Save the cluster YAML for later scaling operations; AWS management operations require access through the bastion host. section 5.2.2

SUBNET_ID=$(az network vnet subnet show \
 --resource-group=VNET_RESOURCE_GROUP_NAME --vnet-name=VNET_NAME \
 --name default --query "id" -otsv)
SSH_PUBLIC_KEY=$(cat KEY_PATH.pub)
 
gcloud alpha container azure node-pools create NODE_POOL_NAME \
  --cluster=CLUSTER_NAME \
  --location GOOGLE_CLOUD_LOCATION \
  --node-version=1.19.10-gke.1000 \
  --vm-size=VM_SIZE \
  --max-pods-per-node=110 \
  --min-nodes=MIN_NODES \
  --max-nodes=MAX_NODES \
  --ssh-public-key="${SSH_PUBLIC_KEY}" \
  --subnet-id="${SUBNET_ID}"

The Azure command creates a named pool for an existing cluster. Replace the placeholders for location, VM size, node limits, subnet, and SSH public key with values from the deployment environment. section 5.6.1

Account for the pool during teardown: delete an Azure cluster’s node pools before deleting the cluster. Minimum node counts also affect resource requirements and cost. Protect the SSH keys used for Azure administration; a security device such as HashiCorp Vault is recommended for retrieval and rotation. section 5.6.2

How Google Anthos in Action covers it

How deep it goes
Shows AWS pool manifest fields and Azure creation and deletion commands, without explaining worker-node internals.
Examples
Uses an AWSNodePool YAML manifest and gcloud alpha commands for Azure pool creation and deletion.
What it assumes
Assumes an existing cluster; Azure creation also requires its location, subnet ID, SSH public key, and node configuration values.
What you can do after
Operate/configure node pools through an AWSNodePool manifest or gcloud alpha Azure commands, including Azure deletion order.
How it connects
Connects node pools to user clusters, Kubernetes custom resources, autoscaling, and cloud virtual machines.

Also explained in

Compare how 2 books explain node pool →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Google Anthos in Action. The section links point to the parts of the book it draws on.