A tag is a custom description that is applied to a node. A tag, once applied, can be helpful when managing nodes using Knife or when building recipes by providing alternate methods of grouping similar types of information.
The knife tag subcommand is used to apply tags to nodes on a server.
Note
Review the list of common options available to this (and all) Knife subcommands and plugins.
The create argument is used to add one or more tags to a node.
This command does not have any specific options.
The following examples show how to use this Knife subcommand:
Create tags
To create tags named “seattle”, “portland”, and “vancouver”, enter:
$ knife tag create node seattle portland vancouver
The delete argument is used to delete one or more tags from a node.
This command does not have any specific options.
The following examples show how to use this Knife subcommand:
Delete tags
To delete tags named “denver” and “phoenix”, enter:
$ knife tag delete node denver phoenix
Type Y to confirm a deletion.
The list argument is used to list all of the tags that have been applied to a node.
This command does not have any specific options.
The following examples show how to use this Knife subcommand:
View a list of tags
To view the tags for a node named “devops_prod1”, enter:
$ knife tag list devops_prod1