etcd集群部署

本文详述了如何部署etcd集群,从准备机器信息开始,逐步讲解安装cfssl工具集、安装ETCD、生成证书、配置并启动ETCD集群的过程。此外,还介绍了配置etcdkeeper作为etcd数据库的可视化工具,以及使用etcdctl命令进行操作。
摘要由CSDN通过智能技术生成

1、机器信息

主机名称 IP地址 操作系统 组件
etcd1 192.168.81.17 Red Hat 7.6 etcd、cfssl
etcd2 192.168.81.18 Red Hat 7.6 etcd
etcd3 192.168.81.19 Red Hat 7.6 etcd

2、安装cfssl工具集

# 地址 https://github.com/cloudflare/cfssl
# cfssl_1.5.0_linux_amd64 /cfssljson_1.5.0_linux_amd64/cfssl-certinfo_1.5.0_linux_amd64
[root@localhost ~]# rename _1.5.0_linux_amd64 '' cfssl*   # 修改名字
[root@localhost ~]# ls
anaconda-ks.cfg  cfssl-certinfo  jdk-8u251-linux-x64.rpm  original-ks.cfg
cfssl            cfssljson       ks-post.log
[root@localhost ~]# chmod +x cfssl*   # 开放可执行权限
[root@localhost ~]# mv cfssl* /usr/local/bin # 用户可执行程序默认位置

3、安装ETCD

# 地址 https://github.com/etcd-io/etcd
[root@localhost ~]# tar -xvf etcd-v3.4.14-linux-amd64.tar.gz
[root@localhost ~]# mv etcd-v3.4.14-linux-amd64 etcd-v3.4.14
[root@localhost etcd-v3.4.14]# ls
Documentation  etcd  etcdctl  README-etcdctl.md  README.md  READMEv2-etcdctl.md
[root@localhost etcd-v3.4.14]# mkdir -p /opt/etcd/{cfg,ssl,bin}
[root@localhost etcd-v3.4.14]# cp etcd etcdctl  /opt/etcd/bin/

4、证书生成

[root@localhost ~]# cd /opt/etcd/ssl
# 创建(ca-config.json、ca-csr.json)ca证书配置文件
[root@localhost ssl]# vim ca-config.json  
{
  "signing": {
    "default": {
      "expiry": "87600h"   
    },
    "profiles": {
      "etcd": {
         "expiry": "87600h",
         "usages": [
            "signing",
            "key encipherment",
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值