Linux学习-etcdctl安装

etcdctl3.5下载链接

bash 复制代码
1. 先通过上面链接下载gz包
 2. 解压
[root@k8s-master ~]# tar xf etcd-v3.5.11-linux-amd64.tar.gz
[root@k8s-master etcd-v3.5.11-linux-amd64]# ls
Documentation  etcd  etcdctl  etcdutl  README-etcdctl.md  README-etcdutl.md  README.md  READMEv2-etcdctl.md
3.将etcdctl命令拷贝至/usr/local/bin目录下,这样就可以直接通过命令行工具使用了
[root@k8s-master etcd-v3.5.11-linux-amd64]# cp etcdctl /usr/local/bin/
4.在/etc/profile文件最下面追加以下4行
export ETCDCTL_API=3
export ETCDCTL_CACERT=/etc/kubernetes/pki/etcd/ca.crt
export ETCDCTL_CERT=/etc/kubernetes/pki/etcd/peer.crt
export ETCDCTL_KEY=/etc/kubernetes/pki/etcd/peer.key
[root@k8s-master etcd-v3.5.11-linux-amd64]# source /etc/profile
5.此时ectdctl命令就可以使用了
#查看版本
[root@k8s-master etcd-v3.5.11-linux-amd64]# etcdctl version
etcdctl version: 3.5.11
API version: 3.5
#获取pods资源
[root@k8s-master etcd-v3.5.11-linux-amd64]# etcdctl get /registry/pods --prefix --keys-only=true
/registry/pods/kube-system/calico-kube-controllers-fc945b5f7-mjgdk
/registry/pods/kube-system/calico-node-2fxpz
/registry/pods/kube-system/calico-node-kmwnp
/registry/pods/kube-system/calico-node-w77xr
/registry/pods/kube-system/coredns-844c6bb88b-k59dn
/registry/pods/kube-system/coredns-844c6bb88b-klwn4
/registry/pods/kube-system/etcd-k8s-master
/registry/pods/kube-system/kube-apiserver-k8s-master
/registry/pods/kube-system/kube-controller-manager-k8s-master
/registry/pods/kube-system/kube-proxy-4tmsx
/registry/pods/kube-system/kube-proxy-br6kf
/registry/pods/kube-system/kube-proxy-vvwnq
/registry/pods/kube-system/kube-scheduler-k8s-master
/registry/pods/mywork/myhttp
/registry/pods/mywork/pod1
相关推荐
赖small强8 分钟前
【蓝牙】BLE 数据收发实战指南(手机 App ↔ 嵌入式 Linux/BlueZ)
linux·蓝牙·bluez·bluetoothctl·dbus-monitor·central·peripheral
wit_yuan10 分钟前
linux udp广播数据包实际用例
linux·服务器·udp
大聪明-PLUS11 分钟前
io_uring:Linux 上的高性能异步 I/O
linux·嵌入式·arm·smarc
qq_4798754320 分钟前
Linux time function in C/C++【2】
linux·c语言·c++
TL滕24 分钟前
从0开始学算法——第一天(如何高效学习算法)
数据结构·笔记·学习·算法
仰望—星空26 分钟前
MiniEngine学习笔记 : CommandAllocatorPool
笔记·学习
小武~39 分钟前
嵌入式网络编程深度优化 --网络协议栈配置实战指南
linux·网络·网络协议
二进制星轨1 小时前
在 Ubuntu 上快速配置 Node.js 环境(附问题说明)
linux·ubuntu·node.js
kblj55551 小时前
学习Linux——网络——网卡
linux·网络·学习
暖阳之下1 小时前
学习周报二十
人工智能·深度学习·学习