Setting environment variables , edition 3,etcdctl Version of 2 And version 3 Not compatible . export ETCDCTL_API=3 increase , check , Delete etcdctl put
/testdir/testkey "Hello world1" etcdctl get /testdir/testkey etcdctl del
/testdir/testkey You can put key It is understood as a table of contents etcdctl put /testdir/testkey1 "Hello world1"
etcdctl put /testdir/testkey2 "Hello world2" etcdctl put /testdir/testkey3
"Hello world3" Batch access to the contents of the directory etcdctl get /testdir/ --prefix Just watch key etcdctl get
/testdir/ --prefix --keys-only Just watch value etcdctl get /testdir/ --prefix
--print-value-only //watch monitor key etcdctl watch /wt/k Turn on monitoring Another starts a client etcdctl put
/wt/k v1 There was a reaction etcdctl put /wt/k v2 There was a reaction etcdctl get /wt/k No response etcdctl del /wt/k
There was a reaction lease ( It can be understood as a timer , hold key After binding , It's time key It was deleted ) Create a etcdctl lease grant 60
Will generate a id, It's like this lease 694d6f805c9ed235 granted with TTL(60s) Create a piece of data and bind it to the above lease
etcdctl put --lease=694d6f805c9ed235 "kkk" "vvv" Get the data now etcdctl get kkk Can be obtained
We'll do it later etcdctl get kkk Get null data Lease can be deleted ( Corresponding key It will also be deleted directly ) etcdctl lease revoke
694d6f805c9ed235 It can be renewed ( Continue 60s) etcdctl lease keep-alive 694d6f805c9ed235
The next chapter of authority control is sorted out separately

Technology
©2019-2020 Toolsou All rights reserved,
Hundreds of millions of locusts rarely collide Locusts want to be self driving Heroes Share has surpassed Ningde Era !LG Chemical confirmation to spin off battery business unit TypeScript Data types in is enough Python Garbage collection and memory leak msf Generate Trojan horse attack android mobile phone Element-UI Implementation of secondary packaging TreeSelect Tree drop-down selection component element-ui+vue-treeselect Verification of drop down box Spring Boot Lesson 16 :SpringBoot Implementation of multithreading with injection class A guess number of small games , use JavaScript realization Unity3D Input Key system