etcdctl环境变量设置

每次使用etcdctl,都要长长的一大串,太麻烦了,直接把变量写入文件中,就方便很多了

vi ~/.bashrc

行尾添加

export ETCDCTL_ENDPOINTS=https://127.0.0.1:2379
export ETCDCTL_CACERT=/etc/kubernetes/pki/etcd/ca.crt
export ETCDCTL_CERT=/etc/kubernetes/pki/etcd/healthcheck-client.crt
export ETCDCTL_KEY=/etc/kubernetes/pki/etcd/healthcheck-client.key

然后保存退出

source ~/.bashrc

然后就可以欢快的etcdctl get /flannel/network/config

 

参考:https://github.com/etcd-io/etcd/tree/master/etcdctl

posted @ 2019-09-10 16:35  驴得水  阅读(1135)  评论(0编辑  收藏  举报