github.com/flavio/docker@v0.1.3-0.20170117145210-f63d1a6eec47/docs/reference/commandline/node_update.md (about) 1 --- 2 title: "node update" 3 description: "The node update command description and usage" 4 keywords: "resources, update, dynamically" 5 --- 6 7 <!-- This file is maintained within the docker/docker Github 8 repository at https://github.com/docker/docker/. Make all 9 pull requests against that repo. If you see this file in 10 another repository, consider it read-only there, as it will 11 periodically be overwritten by the definitive file. Pull 12 requests which include edits to this file in other repositories 13 will be rejected. 14 --> 15 16 ## update 17 18 ```markdown 19 Usage: docker node update [OPTIONS] NODE 20 21 Update a node 22 23 Options: 24 --availability string Availability of the node (active/pause/drain) 25 --help Print usage 26 --label-add value Add or update a node label (key=value) (default []) 27 --label-rm value Remove a node label if exists (default []) 28 --role string Role of the node (worker/manager) 29 ``` 30 31 ### Add label metadata to a node 32 33 Add metadata to a swarm node using node labels. You can specify a node label as 34 a key with an empty value: 35 36 ``` bash 37 $ docker node update --label-add foo worker1 38 ``` 39 40 To add multiple labels to a node, pass the `--label-add` flag for each label: 41 42 ``` bash 43 $ docker node update --label-add foo --label-add bar worker1 44 ``` 45 46 When you [create a service](service_create.md), 47 you can use node labels as a constraint. A constraint limits the nodes where the 48 scheduler deploys tasks for a service. 49 50 For example, to add a `type` label to identify nodes where the scheduler should 51 deploy message queue service tasks: 52 53 ``` bash 54 $ docker node update --label-add type=queue worker1 55 ``` 56 57 The labels you set for nodes using `docker node update` apply only to the node 58 entity within the swarm. Do not confuse them with the docker daemon labels for 59 [dockerd](https://docs.docker.com/engine/userguide/labels-custom-metadata/#daemon-labels). 60 61 For more information about labels, refer to [apply custom 62 metadata](https://docs.docker.com/engine/userguide/labels-custom-metadata/). 63 64 ## Related information 65 66 * [node demote](node_demote.md) 67 * [node inspect](node_inspect.md) 68 * [node ls](node_ls.md) 69 * [node promote](node_promote.md) 70 * [node ps](node_ps.md) 71 * [node rm](node_rm.md)