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
相关推荐
守望时空333 分钟前
Linux挂载NTFS分区指南
linux
逆小舟1 小时前
【C/C++】指针
c语言·c++·笔记·学习
shan~~1 小时前
linux达梦数据库操作
linux·数据库·chrome
liliangcsdn1 小时前
LLM时代基于unstructured解析非结构化pdf
linux·服务器·数据分析
Codigger官方1 小时前
Linux 基金会牵头成立 React 基金会:前端开源生态迎来里程碑式变革
linux·前端·react.js
武文斌771 小时前
项目学习总结:LVGL图形参数动态变化、开发板的GDB调试、sqlite3移植、MQTT协议、心跳包
linux·开发语言·网络·arm开发·数据库·嵌入式硬件·学习
爱吃喵的鲤鱼2 小时前
仿mudou——Connection模块(连接管理)
linux·运维·服务器·开发语言·网络·c++
递归不收敛2 小时前
吴恩达机器学习课程(PyTorch适配)学习笔记:1.3 特征工程与模型优化
pytorch·学习·机器学习
让子弹飞022 小时前
永久解决ubuntu网络连接问题
linux·运维·ubuntu
郝学胜-神的一滴2 小时前
使用Linux的read和write系统函数操作文件
linux·服务器·开发语言·数据库·c++·程序人生·软件工程