The chapter 'Bootstrapping the etcd Cluster' is updated.
parent
891d10a338
commit
3d4b723a82
|
@ -4,10 +4,10 @@ Kubernetes components are stateless and store cluster state in [etcd](https://gi
|
|||
|
||||
## Prerequisites
|
||||
|
||||
The commands in this lab must be run on each controller instance: `controller-1`, `controller-2`, and `controller-3`. Login to each controller instance:
|
||||
The commands in this chapter must be run on each controller instance: `controller-1`, `controller-2`, and `controller-3`. Login to each controller node:
|
||||
|
||||
```
|
||||
$ ssh -i ~/.ssh/id_rsa-k8s.pub 10.240.0.11
|
||||
$ ssh -i ~/.ssh/id_rsa-k8s 10.240.0.11
|
||||
```
|
||||
|
||||
### Running commands in parallel with tmux
|
||||
|
@ -43,22 +43,22 @@ $ {
|
|||
}
|
||||
```
|
||||
|
||||
The instance internal IP address will be used to serve client requests and communicate with etcd cluster peers. Retrieve the internal IP address for the current compute instance:
|
||||
The virtual machine's IP address will be used to serve client requests and communicate with etcd cluster peers. Get IP address for the current virtual machine:
|
||||
|
||||
```
|
||||
$ INTERNAL_IP=$(ip a s | grep 'inet 10' | awk '{ print $2 }' | awk -F"/" '{ print $1 }')
|
||||
```
|
||||
|
||||
Each etcd member must have a unique name within an etcd cluster. Set the etcd name to match the hostname of the current compute instance:
|
||||
Each etcd member must have a unique name within an etcd cluster. Set the etcd name to match the hostname of the current virtual machine:
|
||||
|
||||
```
|
||||
ETCD_NAME=$(hostname -s)
|
||||
$ ETCD_NAME=$(hostname -s)
|
||||
```
|
||||
|
||||
Create the `etcd.service` systemd unit file:
|
||||
|
||||
```
|
||||
cat <<EOF | sudo tee /etc/systemd/system/etcd.service
|
||||
$ cat <<EOF | sudo tee /etc/systemd/system/etcd.service
|
||||
[Unit]
|
||||
Description=etcd
|
||||
Documentation=https://github.com/coreos
|
||||
|
@ -93,7 +93,7 @@ EOF
|
|||
### Start the etcd Server
|
||||
|
||||
```
|
||||
{
|
||||
$ {
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable etcd
|
||||
sudo systemctl start etcd
|
||||
|
@ -107,7 +107,7 @@ EOF
|
|||
List the etcd cluster members:
|
||||
|
||||
```
|
||||
sudo ETCDCTL_API=3 etcdctl member list \
|
||||
$ sudo ETCDCTL_API=3 etcdctl member list \
|
||||
--endpoints=https://127.0.0.1:2379 \
|
||||
--cacert=/etc/etcd/ca.pem \
|
||||
--cert=/etc/etcd/kubernetes.pem \
|
||||
|
|
Loading…
Reference in New Issue