Is it possible to find the number of running Compute Engine Virtual Machines (VM) that belong to a single Google Kubernetes Engine (GKE) node pool using the Google Cloud Platform (GCP) SDK (gcloud
) instead of the console?
After give some time I found out that there is no command to view no of nodes in node pools of GKE cluster through gcloud. But can be view using below command
kubectl get nodes -l cloud.google.com/gke-nodepool=$POOL_NAME -o=name --kubeconfig="$(pwd)/cluster" | wc -l