Skip to content

Latest commit

 

History

History
76 lines (52 loc) · 2.05 KB

File metadata and controls

76 lines (52 loc) · 2.05 KB
layout page_title description
docs
Commands: node pool nodes
The node pool nodes command is used to list nodes in node pool.

Command: node pool nodes

The node pool nodes command is used to list nodes in a node pool.

Usage

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.

  • -json: Output the nodes in JSON format.

  • -page-token: Where to start 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:

$ 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:

$ 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:

$ 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