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
相关推荐
小黑爱编程33 分钟前
【LInux】HTTPS是如何实现安全传输的
linux·安全·https
BeyondESH38 分钟前
Linux线程同步—竞态条件和互斥锁(C语言)
linux·服务器·c++
鱼饼6号1 小时前
Prometheus 上手指南
linux·运维·centos·prometheus
Asher Gu1 小时前
Linux系统编程入门 | 模拟实现 ls -l 命令
linux
c无序1 小时前
【Linux进程控制】进程程序替换
linux
潮汐退涨月冷风霜1 小时前
机器学习之非监督学习(四)K-means 聚类算法
学习·算法·机器学习
GoppViper2 小时前
golang学习笔记29——golang 中如何将 GitHub 最新提交的版本设置为 v1.0.0
笔记·git·后端·学习·golang·github·源代码管理
羊小猪~~2 小时前
深度学习基础案例5--VGG16人脸识别(体验学习的痛苦与乐趣)
人工智能·python·深度学习·学习·算法·机器学习·cnn
Charles Ray3 小时前
C++学习笔记 —— 内存分配 new
c++·笔记·学习
我要吐泡泡了哦4 小时前
GAMES104:15 游戏引擎的玩法系统基础-学习笔记
笔记·学习·游戏引擎