k8s基础(3)etcd集群

本文介绍如何从 GitHub 下载 Etcd 的 3.2.5 版本,并详细说明了在 Linux 系统上安装及配置 Etcd 作为 Kubernetes 集群状态存储的过程。
  • 下载安装

  •   https://github.com/coreos/etcd/releases  在这网页,可以看到有多个版本共选择。
  • 下载3.25
  • 解压后,

    cd etcd-v3.2.5-linux-amd64

    会看到etcd,etcdctl,将它们复制到/usr/local/bin下
  • cp etcd* /usr/bin
  • vim  kube-etcd.service

  • [Unit]
    Description=Kube-etcd Service
    After=network.target

    [Service]
    Type=notify
    ExecStart=/usr/local/bin/etcd \
    --name "etcd1" \
    --data-dir="~/.k8s/etcd" \
    --listen-client-urls "http://192.168.0.222:2379,http://127.0.0.1:2379" \
    --listen-peer-urls "http://192.168.0.222:2380" \
    --advertise-client-urls "http://192.168.0.222:2379" \
    --initial-advertise-peer-urls "http://192.168.0.222:2380" \
    --initial-cluster "etcd1=http://192.168.0.222:2380" \
    --initial-cluster-state "new"
    Restart=always
    LimitNOFILE=65536

    [Install]
    WantedBy=default.target

  • cp -rf kube-etcd.service   /lib/systemd/system/
  • systemctl --system daemon-reload

  • systemctl start kube-etcd.service

转载于:https://www.cnblogs.com/guxiaobei/p/7724409.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值