Files
nomad/website/content/docs/commands/node-pool/nodes.mdx
Aimee Ukasick dae496e427 Docs: SEO front matter description for search: commands section (#25175)
* Enhance front matter description for search

* acl section

* alloc section

* config section

* deployment section

* eval section

* job section

* license section

* namespace section

* node section

* node pool section

* operator section

* plugin section

* quota section

* recommendation section

* scaling section

* sentinel section

* server section

* service section

* setup section

* system section

* tls section

* var section

* volume section

* change reference to command reference

* Apply suggestions from code review

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>

---------

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
2025-03-19 12:02:02 -05:00

77 lines
2.1 KiB
Plaintext

---
layout: docs
page_title: 'nomad node pool nodes command reference'
description: |
The `nomad node pool nodes` command displays nodes in the specified node pool.
---
# `nomad node pool nodes` command reference
The `node pool nodes` command is used to list nodes in a node pool.
## Usage
```plaintext
nomad node pool nodes [options] <node-pool>
```
If ACLs are enabled, this command requires a token with the `node:read`
capability and the `read` capability in a `node_pool` policy that matches the
node pool being targeted.
## General options
@include 'general_options_no_namespace.mdx'
## Nodes options
- `-filter`: Specifies an expression used to [filter results][api_filtering].
- `-json`: Output the nodes in JSON format.
- `-page-token`: Where to start [pagination][api_pagination].
- `-per-page`: How many results to show per page. If not specified, or set to
`0`, all results are returned.
- `-t`: Format and display nodes using a Go template.
- `-verbose`: Display full information.
## Examples
List nodes in the `prod` node pool:
```shell-session
$ nomad node pool nodes prod
ID DC Name Class Drain Eligibility Status
31c5347f dc2 client-3 <none> false eligible ready
3ed547cd dc1 client-1 <none> false eligible ready
6e98e378 dc2 client-2 <none> false eligible ready
```
Filter nodes with an expression:
```shell-session
$ nomad node pool nodes -filter='Datacenter == "dc2"' prod
ID DC Name Class Drain Eligibility Status
31c5347f dc2 client-3 <none> false eligible ready
6e98e378 dc2 client-2 <none> false eligible ready
```
Paginate list:
```shell-session
$ nomad node pool nodes -per-page=2 prod
ID DC Name Class Drain Eligibility Status
31c5347f dc2 us-client-3 <none> false eligible ready
3ed547cd dc1 us-client-1 <none> false eligible ready
Results have been paginated. To get the next page run:
nomad node pool nodes -per-page=2 prod -page-token 6e98e378-b41a-86ac-8e5e-5ca8ab66236d
```
[api_filtering]: /nomad/api-docs#filtering
[api_pagination]: /nomad/api-docs#pagination