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 a node pool. This means you can manage one or more node pools that are attached to your Kubernetes cluster.

What if you need to add or delete nodes? GKE let's you resize the node pool by performing the following 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 nodesNAME                                            STATUS    ROLES     AGE       VERSIONgke-my-k8s-cluster-default-pool-bcae4a66-j8zz   Ready     <none>    32s       v1.10.9-gke.5gke-my-k8s-cluster-default-pool-bcae4a66-jnnw ...

Get DevOps with Kubernetes - Second Edition 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.