ETCD的常用命令
Note that any key that was created using the v2 API will not be able to be queried via the v3 API. A v3 API etcdctl get of a v2 key will exit with 0 and no key data, this is the expected behaviour.
export ETCDCTL_API=3
etcdctl version
1、etcdctl put foo bar
2、etcdctl put foo1 bar1 --lease=1234abcd(创建的租约ID)
3、etcdctl get foo
4、etcdctl get foo --hex
5、$ etcdctl get --prefix foo
foo bar
foo1 bar1
foo2 bar2
foo3 bar3
6、etcdctl get --prefix --limit=2 foo
7、版本,每次修订KEY,都会全局版本加一
Suppose an etcd cluster already has the following keys:
foo = bar # revision = 2
foo1 = bar1 # revision = 3
foo = bar_new # revision = 4
foo1 = bar1_new # revision = 5
Here are an example to access the past versions of keys:
$ etcdctl get --prefix foo # access the most recent versions of keys
foo
bar_new
foo1
bar1_new $ etcdctl get --prefix --rev=4 foo # access the versions of keys at revision 4
foo
bar_new
foo1
bar1 $ etcdctl get --prefix --rev=3 foo # access the versions of keys at revision 3
foo
bar
foo1
bar1 $ etcdctl get --prefix --rev=2 foo # access the versions of keys at revision 2
foo
bar $ etcdctl get --prefix --rev=1 foo # access the versions of keys at revision 1 8、读取》=KEY
Suppose an etcd cluster already has the following keys:
a = 123
b = 456
z = 789
Here is the command to read keys which are greater than or equal to the byte value of key b :
$ etcdctl get --from-key b
b
456
z
789 9、etcdctl del foo1 foo9--范围删除
10、$ etcdctl del --prev-kv zoo
Here is the command to delete key zoo with the deleted key value pair returned
1 # one key is deleted
zoo # deleted key
val # the value of the deleted key 11、$ etcdctl del --from-key b
Here is the command to delete keys which are greater than or equal to the byte value of key b :
2 # two keys are deleted
ETCD的常用命令的更多相关文章
- etcd常用命令记录
etcd常用命令记录 1.查看etcd的版本 [root@etcd01 ssl]# curl -L http://127.0.0.1:2379/version {"etcdserver& ...
- ETCD快速入门-03 常用命令
3. ETCD 常用命令 etcdctl是一个命令行的客户端,它提供了一些命令,可以方便我们在对服务进行测试或者手动修改数据库内容.etcdctl与kubectl和systemctl的命令原理 ...
- [转帖]linux中systemctl详细理解及常用命令
linux中systemctl详细理解及常用命令 2019年06月28日 16:16:52 思维的深度 阅读数 30 https://blog.csdn.net/skh2015java/article ...
- linux中systemctl详细理解及常用命令
linux中systemctl详细理解及常用命令 https://blog.csdn.net/skh2015java/article/details/94012643 一.systemctl理解 Li ...
- 史上最全的Kuberenetes 常用命令手册
1.0 k8s 集群状态检查 # 查看集群信息 kubectl cluster-info systemctl status kube-apiserver systemctl status kubele ...
- Windows下安装kubectl及Node和Pod操作常用命令
kubernetes通过kube-apiserver作为整个集群管理的入口.Apiserver是整个集群的主管理节点,用户通过Apiserver配置和组织集群,同时集群中各个节点同etcd存储的交互也 ...
- 使用kubectl管理Kubernetes(k8s)集群:常用命令,查看负载,命名空间namespace管理
目录 一.系统环境 二.前言 三.kubectl 3.1 kubectl语法 3.2 kubectl格式化输出 四.kubectl常用命令 五.查看kubernetes集群node节点和pod负载 5 ...
- Linux 常用命令(持续补充)
常用命令: command &:将进程放在后台执行 ctrl + z:暂停当前进程 并放入后台 jobs:查看当前后台任务 bg( %id):将任务转为后台执行 fg( %id):将任务调回前 ...
- LVM基本介绍与常用命令
一.LVM介绍LVM是 Logical Volume Manager(逻辑卷管理)的简写,它是Linux环境下对磁盘分区进行管理的一种机制LVM - 优点:LVM通常用于装备大量磁盘的系统,但它同样适 ...
随机推荐
- xpath解析html标签
最近忙一个需求:把一个字符串形式的html文档转化成excel. 分解需求: ① 实现语言 ———— python ② html解析 ———— 用 lxml库的etree工具,xpath方式解析文档树 ...
- 1059 Prime Factors (25分)
1059 Prime Factors (25分) 1. 题目 2. 思路 先求解出int范围内的所有素数,把输入x分别对素数表中素数取余,判断是否为0,如果为0继续除该素数知道余数不是0,遍历到sqr ...
- 路飞-git操作
复习 """ 1.pip换源 - 采用国内源下载,速度快 2.虚拟环境 - 可以为项目单独配置开发环境,方便管理依赖模块及模块的版本迭代 3.后台项目重构目录结构 4.后 ...
- 发送数据给sap和接收
1.确保已经连通sap 2.发送数据:这是以表的形式发送,而且是批量发送给sap 3.接收sap返回信息:这个比较特别,碰到时试一试 package com.yiyezhiqiu.lyh.utils; ...
- HTML学习(3)基础
*开始标签常被称为起始标签(opening tag),结束标签常称为闭合标签(closing tag). *虽然有时候忘记写结束标签有的浏览器也能正常显示内容,但有时候会出现不可预料的结果或错误,所以 ...
- java &&和&与逻辑运算区别
二者都表示与运算,同真为真,遇假即假 && 具有短路功能,前面为false后面不在预算直接表达式为false; &还可以用作位运算符,当&操作符两边的表达式不是 boo ...
- python正则--re模块常用方法
前面几篇关于正则匹配的文章我用的方法都只有一个re.search 但其实正则re模块提供很多非常好用的方法,我们先来看看re模块都有那些属性方法呢 前面的一堆带_或者大写的就不关注了,主要关注最后面的 ...
- mongo的常用命令--转载
转载liyonghui的博文,出处 http://www.cnblogs.com/liyonghui/p/mongodb.html 博主写的特别好,对于我这个新手帮了大忙了,还将mongo和mysq ...
- 第二十八篇 玩转数据结构——堆(Heap)和有优先队列(Priority Queue)
1.. 优先队列(Priority Queue) 优先队列与普通队列的区别:普通队列遵循先进先出的原则:优先队列的出队顺序与入队顺序无关,与优先级相关. 优先队列可以使用队列的接口,只是在 ...
- 关于进程,I/O模型的文章
PHP类 http://rango.swoole.com/archives/508 Node https://github.com/DoubleSpout/threadAndPackage