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通常用于装备大量磁盘的系统,但它同样适 ...
随机推荐
- beego 使用连接mysql 报错 register db Ping `default1`, Error 1049: Unknown database 'test_beego' must have one register DataBase alias named `default`
项目移植到另一台电脑后出现以下问题,及其解决方法: package models import ( "github.com/astaxie/beego/orm" _ "g ...
- 题解【洛谷P2615】[NOIP2015]神奇的幻方
题目描述 幻方是一种很神奇的 \(N \times N\) 矩阵:它由数字 \(1,2,3,\cdots \cdots ,N \times N\) 构成,且每行.每列及两条对角线上的数字之和都相同. ...
- class实现React继承以及constructor的super的问题
看这篇文章之前 建议先看看阮一峰 的Class继承 便于更好的理解 首先要知道一个问题 React的父子组件和组件类的继承有什么关系?答案是:没有关系 父子组件:指的得是组件标签包含关系 父子组件通过 ...
- Go递归函数
package main import "fmt" func main() { /* 递归函数(recursion):一个函数自己调用自己,就叫做递归函数. 递归函数要有一个出口, ...
- Fluent_Python_Part1序幕,01-data-model, 数据模型
01-data-model/frenchdeck.py 1. Python解释器碰到特殊的句法时,会使用__特殊方法__去激活一些基本的对象操作. 特殊方法的存在是为了被解释器用的.没有my_obje ...
- opencv python:边缘保留滤波(EPF)
EPF:E边缘,P保留,F滤波 import cv2 as cv import numpy as np def bi_demo(image): # bilateralFilter(src, d, si ...
- 201771010135 杨蓉庆《面对对象程序设计(java)》第十七周学习总结
1.实验目的与要求 (1) 掌握线程同步的概念及实现技术: (2) 线程综合编程练习 一.理论知识 ⚫ 线程同步 (1)多线程并发运行不确定性问题解决方案:引入线 程同步机制,使得另一线程要使用该方法 ...
- 7、源与值(Source/Values)
学习目录:树莓派学习之路-GPIO Zero 官网地址:https://gpiozero.readthedocs.io/en/stable/source_values.html 环境:UbuntuMe ...
- 在linux环境下python与C++混合编程
参考:在linux环境下编译C++ 程序 linux下python3调用c代码或者python3调用c++代码 https://blog.csdn.net/u013179327/article/det ...
- appium常用的类库、对应的方法和属性
1.driver.swipe(self, start_x, start_y, end_x, end_y, duration=None) tart_x - 滑动开始x轴坐标 start_y - 滑动开始 ...