Getting a list of nodes
To start working with nodes, you need to get a list of them first. To get the nodes list, run the following command:
$ kubectl get nodes
We get the following list of nodes using the preceding command:
The preceding list shows we have three nodes in our Kubernetes cluster with a Ready
status and Kubernetes version 1.17.5-gke.9
. However, if you have cloud-supported node pools with autoscaling, your nodes list could be different because nodes will be added/removed depending on the number of applications running in your cluster.