Part-91: 🚀 Google Kubernetes Engine (GKE) – Node Pools & Node Selectors

When working with Google Kubernetes Engine (GKE), you’ll come across two powerful concepts:

👉 Node Pools
👉 Node Selectors

These help you control how your workloads run on nodes inside your Kubernetes cluster. Let’s break them down step by step.


This content originally appeared on DEV Community and was authored by Latchu@DevOps

When working with Google Kubernetes Engine (GKE), you’ll come across two powerful concepts:

  • 👉 Node Pools
  • 👉 Node Selectors

These help you control how your workloads run on nodes inside your Kubernetes cluster. Let’s break them down step by step.

🟢 Node Pools in GKE

A Node Pool is basically a group of nodes in a GKE cluster with the same configuration.

n1

  • When you create a cluster, GKE automatically creates a default node pool.
  • You can add more node pools with different configurations depending on your workload needs.

🔑 Each node in a pool has a label like this:

cloud.google.com/gke-nodepool: default-pool
cloud.google.com/gke-nodepool: linuxapps-pool

So, GKE automatically labels nodes by their pool name.

✨ Why Node Pools are Useful?

You can categorize workloads by creating node pools with specific configurations. For example:

  • đź–´ Node pool with local SSDs for high I/O apps
  • ⚡ Node pool with minimum CPU platform for performance tuning
  • đź’° Node pool with Spot VMs for cost savings
  • 🖥️ Node pool with a specific machine type (e.g., e2-standard-4)
  • 🖼️ Node pool with a specific node image (e.g., Container-Optimized OS vs Ubuntu)

👉 You can resize node pools by adding/removing nodes.
👉 You can enable Cluster Autoscaler so node pools automatically scale up/down based on usage.

⚠️ Important: You cannot change a single node’s config inside a node pool. Any change applies to the entire pool.

🟡 Kubernetes Node Selectors

n2

A Node Selector is a simple way to tell Kubernetes where your Pod should run.

It’s part of the Pod spec and works with key-value labels.

Example: If you want a Pod to run only in the linuxapps-pool node pool 👇

apiVersion: v1
kind: Pod
metadata:
  name: my-linux-app
spec:
  nodeSelector:
    cloud.google.com/gke-nodepool: linuxapps-pool
  containers:
    - name: my-container
      image: nginx

Here’s what happens:

  • Kubernetes looks at your cluster nodes.
  • It finds nodes with the label cloud.google.com/gke-nodepool=linuxapps-pool.
  • It schedules your Pod there. âś…

🔑 Quick Recap

  • Node Pools = groups of nodes with the same configuration.
  • Node Selectors = simple rules to make sure Pods land on the right nodes.

Together, these give you fine-grained control over workload placement in GKE.


This content originally appeared on DEV Community and was authored by Latchu@DevOps


Print Share Comment Cite Upload Translate Updates
APA

Latchu@DevOps | Sciencx (2025-09-27T09:04:51+00:00) Part-91: 🚀 Google Kubernetes Engine (GKE) – Node Pools & Node Selectors. Retrieved from https://www.scien.cx/2025/09/27/part-91-%f0%9f%9a%80-google-kubernetes-engine-gke-node-pools-node-selectors/

MLA
" » Part-91: 🚀 Google Kubernetes Engine (GKE) – Node Pools & Node Selectors." Latchu@DevOps | Sciencx - Saturday September 27, 2025, https://www.scien.cx/2025/09/27/part-91-%f0%9f%9a%80-google-kubernetes-engine-gke-node-pools-node-selectors/
HARVARD
Latchu@DevOps | Sciencx Saturday September 27, 2025 » Part-91: 🚀 Google Kubernetes Engine (GKE) – Node Pools & Node Selectors., viewed ,<https://www.scien.cx/2025/09/27/part-91-%f0%9f%9a%80-google-kubernetes-engine-gke-node-pools-node-selectors/>
VANCOUVER
Latchu@DevOps | Sciencx - » Part-91: 🚀 Google Kubernetes Engine (GKE) – Node Pools & Node Selectors. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/09/27/part-91-%f0%9f%9a%80-google-kubernetes-engine-gke-node-pools-node-selectors/
CHICAGO
" » Part-91: 🚀 Google Kubernetes Engine (GKE) – Node Pools & Node Selectors." Latchu@DevOps | Sciencx - Accessed . https://www.scien.cx/2025/09/27/part-91-%f0%9f%9a%80-google-kubernetes-engine-gke-node-pools-node-selectors/
IEEE
" » Part-91: 🚀 Google Kubernetes Engine (GKE) – Node Pools & Node Selectors." Latchu@DevOps | Sciencx [Online]. Available: https://www.scien.cx/2025/09/27/part-91-%f0%9f%9a%80-google-kubernetes-engine-gke-node-pools-node-selectors/. [Accessed: ]
rf:citation
» Part-91: 🚀 Google Kubernetes Engine (GKE) – Node Pools & Node Selectors | Latchu@DevOps | Sciencx | https://www.scien.cx/2025/09/27/part-91-%f0%9f%9a%80-google-kubernetes-engine-gke-node-pools-node-selectors/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.