Apply Markdown best practices (block code language specification, spacing between lines, spacing between char, ...

This commit is contained in:
Nemo
2020-06-20 09:24:03 +02:00
parent 0d07e90828
commit acbb8958e6
15 changed files with 193 additions and 199 deletions

View File

@@ -6,7 +6,7 @@ Kubernetes components are stateless and store cluster state in [etcd](https://gi
The commands in this lab must be run on each controller instance: `controller-0`, `controller-1`, and `controller-2`. Login to each controller instance using the `gcloud` command. Example:
```
```bash
gcloud compute ssh controller-0
```
@@ -20,14 +20,14 @@ gcloud compute ssh controller-0
Download the official etcd release binaries from the [etcd](https://github.com/etcd-io/etcd) GitHub project:
```
```bash
wget -q --show-progress --https-only --timestamping \
"https://github.com/etcd-io/etcd/releases/download/v3.4.0/etcd-v3.4.0-linux-amd64.tar.gz"
```
Extract and install the `etcd` server and the `etcdctl` command line utility:
```
```bash
{
tar -xvf etcd-v3.4.0-linux-amd64.tar.gz
sudo mv etcd-v3.4.0-linux-amd64/etcd* /usr/local/bin/
@@ -36,7 +36,7 @@ Extract and install the `etcd` server and the `etcdctl` command line utility:
### Configure the etcd Server
```
```bash
{
sudo mkdir -p /etc/etcd /var/lib/etcd
sudo cp ca.pem kubernetes-key.pem kubernetes.pem /etc/etcd/
@@ -45,20 +45,20 @@ Extract and install the `etcd` server and the `etcdctl` command line utility:
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:
```
```bash
INTERNAL_IP=$(curl -s -H "Metadata-Flavor: Google" \
http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip)
```
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:
```
```bash
ETCD_NAME=$(hostname -s)
```
Create the `etcd.service` systemd unit file:
```
```bash
cat <<EOF | sudo tee /etc/systemd/system/etcd.service
[Unit]
Description=etcd
@@ -94,7 +94,7 @@ EOF
### Start the etcd Server
```
```bash
{
sudo systemctl daemon-reload
sudo systemctl enable etcd
@@ -108,7 +108,7 @@ EOF
List the etcd cluster members:
```
```bash
sudo ETCDCTL_API=3 etcdctl member list \
--endpoints=https://127.0.0.1:2379 \
--cacert=/etc/etcd/ca.pem \
@@ -118,7 +118,7 @@ sudo ETCDCTL_API=3 etcdctl member list \
> output
```
```bash
3a57933972cb5131, started, controller-2, https://10.240.0.12:2380, https://10.240.0.12:2379
f98dc20bce6225a0, started, controller-0, https://10.240.0.10:2380, https://10.240.0.10:2379
ffed16798470cab5, started, controller-1, https://10.240.0.11:2380, https://10.240.0.11:2379