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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.