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
相关推荐
~城南花已开~19 分钟前
Redfish 事件接收服务搭建指南(Ubuntu Server 实测)
linux·服务器·python·ubuntu
kyrie_sakura30 分钟前
大模型学习17 大模型学习 - LangChain1_概述
学习
倔强的石头10640 分钟前
【Linux指南】进程通信系列(四):命名管道 FIFO —— 让陌生进程按名字见面
linux·服务器·网络
段一凡-华北理工大学1 小时前
高炉能源系统智能化:热风炉、煤气与极致能效~系列文章03:热风炉烧炉与风温的决定因素
大数据·linux·人工智能·能源·热风炉·高炉能源优化
_小许_1 小时前
Linux 常用命令速查:CentOS 与 Ubuntu 双线对照
linux·ubuntu·centos
程序猿乐锅1 小时前
【从0-1学习Python | 第九篇】继承
开发语言·后端·python·学习·fastapi
码农客栈1 小时前
mt7601u移植
linux·运维·服务器
海绵宝宝转agent1 小时前
leetcodehot100个人题解
java·笔记·学习·算法
2601_949847752 小时前
io-ts 跨端三方库仓颉适配全流程
linux·运维·ubuntu
学长毕设12 小时前
基于SpringBoot的青少年编程学习平台系统-附源码
spring boot·学习·青少年编程