Store Data in Consul KV Flashcards
There are two ways to interact with the Consul KV store: the _ and_
Consul CLI
UI
Insert value 25 in the keyredis/config/maxconns
consul kv put redis/config/maxconns 25
Keys support setting a _ value that isn’t used internally by Consul, but can be used by clients to add metadata to any KV pair.
64-bit integer flag
Now, query for the value of one of the keys you just entered.
consul kv get redis/config/minconns
Consul retains some additional metadata about the key-value pair. Retrieve the some metadata (including the “flag” you set) using the_command line flag.
-detailed
List all the keys in the store using the_options. Results are returned in lexicographical order. (Say the command)
recurse
consul kv get -recurse
Delete all the keys with theredisprefix using the_option. (Say the command)
recurse
consul kv delete -recurse redis