Chapter nine analyzes take you easily complete explosion etcd - cluster initialization

Series:


Index List: nine analyze with you easily complete explosion etcd tutorial series

table of Contents

1 Introduction

2 offer

3 cluster initialization commands

4 etcd open port

5 etcd cluster initialization parameters


1 Introduction

        If you have any questions about the blog, please let me know.1.png


2 offer

        You can get a free, more vivid video data from the following screenshot:clipboard2.png


3 cluster initialization commands

        In the first chapter of this series, " nine analysis with you easily complete explosion ectd - Installation Guide ", we introduce the installation etcd clusters, but in order to control the length of the article, and do not detail the parameters of the cluster initialization cluster node initialization statement is as follows:

etcd --name k8s-m-1

--data-dir=data.etcd  

--initial-advertise-peer-urls http://192.168.182.181:2380

--listen-peer-urls http://192.168.182.181:2380

--advertise-client-urls http://192.168.182.181:2379

--listen-client-urls http://192.168.182.181:2379

--initial-cluster k8s-m-1=http://192.168.182.181:2380,k8s-m-2=http://192.168.182.182:2380,k8s-m-3=http://192.168.182.183:2380

--initial-cluster-state new

--initial-cluster-token jiuxi_token >> etcd.log 2>&1


4 etcd open port

        etcd opening two service ports, the default is 2379,2380:

2379: The client communication nodes with etcd, such as client calls etcd instruction execution CRUD

2380: etcd communication between nodes with node (such as: raft election)

        etcd port open as shown below:clipboard3.png


5 etcd cluster initialization parameters

        Introduced in front of etcd cluster initialization statements, open etcd process of external monitor port, following brief on this basis etcd cluster initialization parameters:

etcd --name k8s-m-1

--data-dir=data.etcd  

--initial-advertise-peer-urls http://192.168.182.181:2380

--listen-peer-urls http://192.168.182.181:2380

--advertise-client-urls http://192.168.182.181:2379

--listen-client-urls http://192.168.182.181:2379

--initial-cluster k8s-m-1=http://192.168.182.181:2380,k8s-m-2=http://192.168.182.182:2380,k8s-m-3=http://192.168.182.183:2380

--initial-cluster-state new

--initial-cluster-token jiuxi_token >> etcd.log 2>&1

        Parameters are described below:

1 name: node name, the default default, the cluster should be unique, you can use the hostname

2 data-dir: node data storage directory data, including storage node ID, cluster ID, a cluster initial configuration, Snapshot, wal files

3 initial-advertise-peer-urls: Address node of an announcement of the (default port 2380)

4 listen-peer-urls: addresses (the default port 2380) used when the local node to communicate with other nodes, the parameter value with typically initial-advertise-peer-urls value of a parameter

5 advertise-client-urls: an announcement of this node address client connections (default port 2379)

6 listen-client-urls: This node provides services to client connection address (default port 2379)

7 initial-cluster: information for all nodes in the cluster. Format: node1 = http: // <node1>: 2380, node2 = http: // <node2>: 2380 ...

8 initial-cluster-state: When a new cluster, a new new value; if the cluster exists, this value is existing

9 initial-cluster-token: Create a token cluster, this value remains unique for each cluster

Guess you like

Origin blog.51cto.com/14625168/2479433