Node pool

When launching the Kubernetes cluster, you can specify the number of nodes using the --num-nodes option. GKE manages a Kubernetes node as node pool. Which means you can manage one or more node pools that attach to your Kubernetes cluster.

What if you need to add more nodes or delete some nodes? GKE provides a functionality to resize the node pool by following the command to change Kubernetes node from 3 to 5:

//run resize command to change number of nodes to 5
$ gcloud container clusters resize my-k8s-cluster --size 5 --zone asia-northeast1-a
    //after a few minutes later, you may see additional nodes $ kubectl get nodes NAME STATUS AGE VERSION gke-my-k8s-cluster-default-pool-ae180f53-47h5 Ready 5m v1.6.7 gke-my-k8s-cluster-default-pool-ae180f53-6prb ...

Get DevOps with Kubernetes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.