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

©2019-2020 Toolsou All rights reserved,
【 Explain in detail 】 Interview must ask :SpringBoot Automatic configuration principle 【 Hyper detail 】Java Realization of student information management system 2020 The 11th National Blue Bridge Cup Python group JavaScript note ( five )---- Branch statement MYSQL database SQL Sentence practice experiment EXERCISES. 1 SIMPLE COMMANDSMySQL Basics Commonly used sentence ( Add / delete / modify query )C++ of string of compare usage vue limit input Only positive numbers can be entered C Language of a Gobang game implementation Programmer refused due to low salary offer,HR become shame , Netizens instantly blew up ..