k8s配置etcdctl命令

k8s配置etcdctl命令

docker cp `docker ps -a | awk '/k8s_etcd/{print $1}'`:/usr/local/bin/etcdctl /usr/local/bin/etcdctl

查看etcd状态脚本

cat /sbin/etcdstatus
ETCD_CERET_DIR=/etc/kubernetes/pki/etcd/
ETCD_CA_FILE=ca.crt
ETCD_KEY_FILE=healthcheck-client.key
ETCD_CERT_FILE=healthcheck-client.crt
ETCD_EP=https://10.0.2.121:2379,https://10.0.2.122:2379,https://10.0.2.123:2379

 etcd_v2="etcdctl --cert-file ${ETCD_CERET_DIR}/${ETCD_CERT_FILE} \
              --key-file ${ETCD_CERET_DIR}/${ETCD_KEY_FILE}  \
              --ca-file ${ETCD_CERET_DIR}/${ETCD_CA_FILE}  \
              --endpoints $ETCD_EP"

 etcd_v3="etcdctl   \
   --cert ${ETCD_CERET_DIR}/${ETCD_CERT_FILE} \
   --key ${ETCD_CERET_DIR}/${ETCD_KEY_FILE} \
   --cacert ${ETCD_CERET_DIR}/${ETCD_CA_FILE} \
    --endpoints $ETCD_EP"
export ETCDCTL_API=3
comm="$etcd_v3 endpoint status --write-out=table"
echo "`$comm`"

加权限 777

chmod  777 /sbin/etcdstatus

给TA打赏
共{{data.count}}人
人已打赏
系统工具

Centos6 openssh 8.6p1 rpm 下载

2021-8-19 21:01:46

常用工具命令

ngrep命令

2018-4-22 18:04:15

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索