K8S-ETCD 启动脚本

Published on with 0 views and 0 comments

  

那就请使用这个 Command 吧

  由于 GitHub Release 下载下来只有 etcd 和 etcdctl 并没有 配置文件 和 systemctl.service 所以迫不得已写了个命令行,贴出来已备后用

 1#!/bin/bash
 2// name 请改成当前节点 etcd的name
 3// etcd 命令请指定到自己的目录
 4// ip地址请改成自己的地址
 5// pem证书目录请改成自己的目录
 6/opt/etcd/etcd --name etcd-1 \
 7		--data-dir var/lib/etcd/default.etcd \
 8		--listen-peer-urls https://192.168.1.109:2380 \
 9		--listen-client-urls https://192.168.1.109:2379,http://127.0.0.1:2379 \
10		--advertise-client-urls https://192.168.1.109:2379 \
11		--initial-advertise-peer-urls https://192.168.1.109:2380 \
12		--initial-cluster etcd-1=https://192.168.1.119:2380,etcd-2=https://192.168.1.99:2380,etcd-3=https://192.168.1.109:2380 \
13		--initial-cluster-token etcd-cluster \
14		--initial-cluster-state new \
15		--cert-file /opt/ssl/k8sca/etcd.pem \
16		--key-file /opt/ssl/k8sca/etcd-key.pem \
17		--peer-cert-file /opt/ssl/k8sca/etcd.pem \
18		--peer-key-file /opt/ssl/k8sca/etcd-key.pem \
19		--trusted-ca-file /opt/ssl/k8sca/ca.pem \
20		--peer-trusted-ca-file /opt/ssl/k8sca/ca.pem

标题:K8S-ETCD 启动脚本
作者:fe
地址:https://blog.eiyouhe.com/articles/2020/03/19/1584630262465.html