kubeadm HA guide: fix indentation and use EOF instead of EOL (#7249)

* Use EOF instead of EOL in HA guide

This is for consistency with the rest of the docs.

* Change indentation from 4 to 3 spaces

The number of spaces in indentation is expected to be divisible by 3.
By having 4 spaces, an extra space was added to the beginning of all
shell code sections, causing issues for heredoc interpretation on
copy/paste.
reviewable/pr7286/r2
Matt Kelly 2018-02-08 15:07:47 -05:00 committed by k8s-ci-robot
parent a640f13cd5
commit 24caa1a9af
1 changed files with 286 additions and 286 deletions

View File

@ -67,7 +67,7 @@ For **Option 2**: you can skip to the next step. Any reference to `etcd0`, `etcd
cd /etc/kubernetes/pki/etcd cd /etc/kubernetes/pki/etcd
``` ```
```shell ```shell
cat >ca-config.json <<EOL cat >ca-config.json <<EOF
{ {
"signing": { "signing": {
"default": { "default": {
@ -103,10 +103,10 @@ For **Option 2**: you can skip to the next step. Any reference to `etcd0`, `etcd
} }
} }
} }
EOL EOF
``` ```
```shell ```shell
cat >ca-csr.json <<EOL cat >ca-csr.json <<EOF
{ {
"CN": "etcd", "CN": "etcd",
"key": { "key": {
@ -114,7 +114,7 @@ For **Option 2**: you can skip to the next step. Any reference to `etcd0`, `etcd
"size": 2048 "size": 2048
} }
} }
EOL EOF
``` ```
Ensure that the `names` section in `ca-csr.json` matches your own company or personal address, or that you use a suitable default. Ensure that the `names` section in `ca-csr.json` matches your own company or personal address, or that you use a suitable default.
@ -132,7 +132,7 @@ For **Option 2**: you can skip to the next step. Any reference to `etcd0`, `etcd
While on `etcd0`, run the following: While on `etcd0`, run the following:
```shell ```shell
cat >client.json <<EOL cat >client.json <<EOF
{ {
"CN": "client", "CN": "client",
"key": { "key": {
@ -140,7 +140,7 @@ For **Option 2**: you can skip to the next step. Any reference to `etcd0`, `etcd
"size": 256 "size": 256
} }
} }
EOL EOF
``` ```
```shell ```shell
cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json -profile=client client.json | cfssljson -bare client cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json -profile=client client.json | cfssljson -bare client
@ -243,7 +243,7 @@ Please select one of the tabs to see installation instructions for the respectiv
1. Now copy the systemd unit file like so: 1. Now copy the systemd unit file like so:
```shell ```shell
cat >/etc/systemd/system/etcd.service <<EOL cat >/etc/systemd/system/etcd.service <<EOF
[Unit] [Unit]
Description=etcd Description=etcd
Documentation=https://github.com/coreos/etcd Documentation=https://github.com/coreos/etcd
@ -278,7 +278,7 @@ Please select one of the tabs to see installation instructions for the respectiv
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOL EOF
``` ```
Make sure you replace `<etcd0-ip-address>`, `<etcd1-ip-address>` and `<etcd2-ip-address>` with the appropriate IPv4 addresses. Make sure you replace `<etcd0-ip-address>`, `<etcd1-ip-address>` and `<etcd2-ip-address>` with the appropriate IPv4 addresses.
@ -304,7 +304,7 @@ Please select one of the tabs to see installation instructions for the respectiv
1. The first step is to run the following to generate the manifest file: 1. The first step is to run the following to generate the manifest file:
```shell ```shell
cat >/etc/kubernetes/manifests/etcd.yaml <<EOL cat >/etc/kubernetes/manifests/etcd.yaml <<EOF
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
@ -369,7 +369,7 @@ Please select one of the tabs to see installation instructions for the respectiv
- hostPath: - hostPath:
path: /etc/kubernetes/pki/etcd path: /etc/kubernetes/pki/etcd
name: certs name: certs
EOL EOF
``` ```
Make sure you replace: Make sure you replace:
@ -415,7 +415,7 @@ Only follow this step if your etcd is hosted on dedicated nodes (**Option 1**).
1. In order for kubeadm to run, you first need to write a configuration file: 1. In order for kubeadm to run, you first need to write a configuration file:
```shell ```shell
cat >config.yaml <<EOL cat >config.yaml <<EOF
apiVersion: kubeadm.k8s.io/v1alpha1 apiVersion: kubeadm.k8s.io/v1alpha1
kind: MasterConfiguration kind: MasterConfiguration
api: api:
@ -434,7 +434,7 @@ Only follow this step if your etcd is hosted on dedicated nodes (**Option 1**).
- <load-balancer-ip> - <load-balancer-ip>
apiServerExtraArgs: apiServerExtraArgs:
apiserver-count: 3 apiserver-count: 3
EOL EOF
``` ```
Ensure that the following placeholders are replaced: Ensure that the following placeholders are replaced: