<p>I am looking for a way to list all nodes in a specific nodepool but not able to find any examples.</p>
<p>Is there a way to specify meta data with json? Or use an awk filter?</p>
<p>The following will list all nodes in the cluster
<code>kubectl get nodes</code></p>

Kiara Parks
<p>Nodes have label with their node group.
To print a list of all of yours nodes and their node group run:</p>
<pre><code>&gt; kubectl get node -o=custom-columns='node_name:metadata.name, node_group:metadata.labels.cloud\.google\.com/gke-nodepool'
node_name                                    node_group
gke-ml-prd-default-node-pool-03d09fca-jj3x   default-node-pool
gke-ml-prd-default-node-pool-4649f5b7-j1qc   default-node-pool
gke-ml-prd-default-node-pool-4a9ff740-2my4   default-node-pool
gke-ml-prd-default-node-pool-9a199b2d-q573   default-node-pool
</code></pre>
<p>Of course you need to change the label according to your cloud provider.
Take a look on the labels of one of your nodes with <code>kubectl describe &lt;node_name&gt;</code> and find the relevant label name.</p>
<p>These are names in the popular cloud providers.</p>
<ul>
<li><strong>gke</strong>: cloud.google.com/gke-nodepool</li>
<li><strong>eks</strong>: eks.amazonaws.com/nodegroup</li>
<li><strong>aks</strong>: kubernetes.azure.com/agentpool</li>
</ul>
<p>You can also filter for specific group with
<code>kubectl get node --selector='cloud.google.com/gke-nodepool=default-node-pood'</code></p>
