Files
nomad/website/content/docs/other-specifications/node-pool.mdx
Aimee Ukasick c12ad24de0 Docs: SEO updates to operations, other specs sections (#25518)
* seo operation section

* other specifications section

* Update website/content/docs/other-specifications/variables.mdx

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

---------

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
2025-05-22 07:47:05 -05:00

81 lines
2.8 KiB
Plaintext

---
layout: docs
page_title: Nomad node pool specification
description: |-
Learn about Nomad's node pool specification. Review an example node pool specification. Configure description, metadata, and scheduler options.
---
# Nomad node pool specification
Node pools group nodes, letting you restrict which jobs are able to place
allocations in a given set of nodes. Specify node pools as HCL files and submit
them with the [`nomad node pool apply`][pool-apply] CLI command. Unlike [job
specifications][jobspecs], node pool specifications do not support HCL2
features like functions.
This example is a node pool specification generated with the [`nomad node pool
init` command][pool-init].
```hcl
node_pool "example" {
description = "Example node pool"
# meta is optional metadata on the node pool, defined as key-value pairs.
# The scheduler does not use node pool metadata as part of scheduling.
meta {
environment = "prod"
owner = "sre"
}
# The scheduler configuration options specific to this node pool. This block
# supports a subset of the fields supported in the global scheduler
# configuration as described at:
# https://developer.hashicorp.com/nomad/docs/commands/operator/scheduler/set-config
#
# * scheduler_algorithm is the scheduling algorithm to use for the pool.
# If not defined, the global cluster scheduling algorithm is used.
#
# Available only in Nomad Enterprise.
# scheduler_config {
# scheduler_algorithm = "spread"
# }
}
```
Example usage if the above is in a file named `pool.nomad.hcl`:
```shell-session
$ nomad node pool apply ./pool.nomad.hcl
Successfully applied node pool "example"!
```
## Parameters
- `description` `(string: <optional>)` - Sets a human readable description for
the node pool.
- `meta` `(map[string]string: <optional>)` - Sets optional metadata on the node
pool, defined as key-value pairs. The scheduler does not use node pool
metadata as part of scheduling.
- `scheduler_config` <code>([SchedulerConfig][sched-config]: nil)</code> <EnterpriseAlert inline /> -
Sets scheduler configuration options specific to the node pool. If not
defined, the global scheduler configurations are used.
### `scheduler_config` parameters <EnterpriseAlert inline />
- `scheduler_algorithm` `(string: <optional>)` - The [scheduler algorithm][]
used for this node pool. Must be one of `binpack` or `spread`.
- `memory_oversubscription_enabled` `(bool: <optional>)` - The [memory
oversubscription][] setting to use for this node pool.
[pool-apply]: /nomad/docs/commands/node-pool/apply
[jobspecs]: /nomad/docs/job-specification
[pool-init]: /nomad/docs/commands/node-pool/init
[sched-config]: #scheduler_config-parameters
[scheduler algorithm]: /nomad/api-docs/operator/scheduler#scheduleralgorithm-1
[memory oversubscription]: /nomad/api-docs/operator/scheduler#memoryoversubscriptionenabled-1