-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add node meta command docs (#16828)
* docs: add node meta command docs Fixes #16758 * it helps if you actually add the files to git * fix typos and examples vs usage
- Loading branch information
1 parent
9898e85
commit 38d0a2f
Showing
6 changed files
with
155 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
layout: docs | ||
page_title: 'Commands: node meta apply' | ||
description: | | ||
The node meta apply command updates node metadata. | ||
--- | ||
|
||
# Command: node meta apply | ||
|
||
Modify a node's metadata. This command only applies to client agents, and can | ||
be used to update the scheduling metadata the node registers. | ||
|
||
~> Changes are batched and may take up to 10 seconds to propagate to the | ||
servers and affect scheduling. | ||
|
||
This command uses the [`/v1/client/metadata` HTTP API][api]. | ||
|
||
## Usage | ||
|
||
```plaintext | ||
nomad node meta apply [-node-id ...] [-unset ...] key1=value1 ... kN=vN | ||
``` | ||
|
||
## General Options | ||
|
||
@include 'general_options.mdx' | ||
|
||
## Node Meta Apply Options | ||
|
||
- `-node-id` - Updates metadata on the specified node. If not specified the | ||
node receiving the request will be used by default. | ||
|
||
- `-unset` - Unset the comma separated list of keys. | ||
|
||
## Examples | ||
|
||
```shell-session | ||
$ nomad node meta apply -unset testing,tempvar ready=1 role=preinit-db | ||
``` | ||
|
||
[api]: /nomad/api-docs/client#update-node-metadata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
layout: docs | ||
page_title: 'Commands: node meta' | ||
description: | | ||
The node meta commands are used to read and update node metadata. | ||
--- | ||
|
||
# Command: node meta | ||
|
||
The `meta` command is used to read and update node metadata. This metadata is | ||
available for [interpolation using the `${meta.<key>}` syntax in jobs][interp]. | ||
|
||
## Usage | ||
|
||
Usage: `nomad node meta <subcommand> [options]` | ||
|
||
The `apply` subcommand allows for dynamically updating node metadata. The | ||
`read` subcommand allows reading all of the metadata set on the client. All | ||
commands interact directly with a client and allow setting a custom target with | ||
the `-node-id` option. | ||
|
||
Please see the individual subcommand help for detailed usage information: | ||
|
||
- [`apply`][apply] - Modify node metadata | ||
- [`read`][read] - Read node metadata | ||
|
||
[interp]: /nomad/docs/runtime/interpolation#node-attributes | ||
[apply]: /nomad/docs/commands/node/meta/apply | ||
[read]: /nomad/docs/commands/node/meta/read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
layout: docs | ||
page_title: 'Commands: node meta read' | ||
description: | | ||
The node meta read command reads node metadata. | ||
--- | ||
|
||
# Command: node meta read | ||
|
||
Read a node's metadata. This command only works on client agents. The node | ||
status command can be used to retrieve node metadata from any agent. | ||
|
||
Changes via the "node meta apply" subcommand are batched and may take up to | ||
10 seconds to propagate to the servers and affect scheduling. This command | ||
will always return the most recent node metadata while the "node status" | ||
command can be used to view the metadata that is currently being used for | ||
scheduling. | ||
|
||
This command uses the [`/v1/client/metadata` HTTP API][api]. | ||
|
||
## Usage | ||
|
||
```plaintext | ||
nomad node meta read [-json] [-node-id ...] | ||
``` | ||
|
||
## General Options | ||
|
||
@include 'general_options.mdx' | ||
|
||
## Node Meta Read Options | ||
|
||
- `-node-id` - Reads metadata on the specified node. If not specified the | ||
node receiving the request will be used by default. | ||
|
||
- `-json` - Output the node metadata in its JSON format. | ||
|
||
- `-t` : Format and display node using a Go template. | ||
|
||
## Example | ||
|
||
```shell-session | ||
$ nomad node meta read -node-id 3b58b0a6 | ||
All Meta | ||
connect.gateway_image = envoyproxy/envoy:v${NOMAD_envoy_version} | ||
connect.log_level = info | ||
connect.proxy_concurrency = 1 | ||
connect.sidecar_image = envoyproxy/envoy:v${NOMAD_envoy_version} | ||
example = a | ||
Dynamic Meta | ||
example = a | ||
Static Meta | ||
connect.gateway_image = envoyproxy/envoy:v${NOMAD_envoy_version} | ||
connect.log_level = info | ||
connect.proxy_concurrency = 1 | ||
connect.sidecar_image = envoyproxy/envoy:v${NOMAD_envoy_version} | ||
``` | ||
|
||
[api]: /nomad/api-docs/client#read-node-metadata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters