Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Configure Etcd clustering and TLS authentication

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

First, prepare before installation

Etcd software version: etcd-v3.3.10-linux-amd64.tar.gz

System: centos7.3

Firewall off

Systemctl stop firewalld

Systemctl disable firewalld

Selinux shuts down

Configuration / etc/hosts (three operations)

192.168.159.121 k8s-master-01

192.168.159.122 k8s-node01

192.168.159.123 k8s-node02

Configure time synchronization

Yum-y install ntpdate

Crontab-e

# time synchronization

* / 5 * / usr/sbin/ntpdate 0.asia.pool.ntp.org

Second, configure key-free login (three operations)

Three sets operate first.

Ssh-keygen

Three sets operation

Ssh-copy-id-I / root/.ssh/id_rsa.pub root@k8s-node01

Ssh-copy-id-I / root/.ssh/id_rsa.pub root@k8s-node02

Ssh-copy-id-I / root/.ssh/id_rsa.pub root@k8s-master-01

Third, install etcd software

Three sets to create a directory

Mkdir-p / app/etcd/ {bin,cfg,ssl}

Extract the file

Tar zxvf etcd-v3.3.10-linux-amd64.tar.gz

Cp etcd-v3.3.10-linux-amd64/ {etcd,etcdctl} / app/etcd/bin/

Scp / app/etcd/bin/* root@k8s-node01:/app/etcd/bin/

Scp / app/etcd/bin/* root@k8s-node02:/appt/etcd/bin/

4. Configure etcd tls

1. Download cfssl (three operations)

Curl-L https://pkg.cfssl.org/R1.2/cfssl_linux-amd64-o / usr/local/bin/cfssl

Curl-L https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64-o / usr/local/bin/cfssljson

Curl-L https://pkg.cfssl.org/R1.2/cfssl-certinfo_linux-amd64-o / usr/local/bin/cfssl-certinfo

Chmod + x / usr/local/bin/cfssl / usr/local/bin/cfssljson / usr/local/bin/cfssl-certinfo

2. Generate a certificate

Mkdir etcd-cert

Cd etcd-cert

Vi etcd-cert.sh

Cat > ca-config.json

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report