Fix rendering issues in high-availability topic (#8663)

This commit is contained in:
Tim Fogarty 2018-06-08 12:15:38 -07:00 committed by k8s-ci-robot
parent 6094a7ea6e
commit 6608a4c76c
1 changed files with 25 additions and 25 deletions

View File

@ -446,14 +446,14 @@ Only follow this step if your etcd is hosted on dedicated nodes (**Option 1**).
## Run kubeadm init on master0 {#kubeadm-init-master0}
1. In order for kubeadm to run, you first need to write a configuration file:
```bash
cat >config.yaml <<EOF
apiVersion: kubeadm.k8s.io/v1alpha1
kind: MasterConfiguration
api:
1. In order for kubeadm to run, you first need to write a configuration file:
```none
cat >config.yaml <<EOF
apiVersion: kubeadm.k8s.io/v1alpha1
kind: MasterConfiguration
api:
advertiseAddress: <private-ip>
etcd:
etcd:
endpoints:
- https://<etcd0-ip-address>:2379
- https://<etcd1-ip-address>:2379
@ -461,34 +461,34 @@ Only follow this step if your etcd is hosted on dedicated nodes (**Option 1**).
caFile: /etc/kubernetes/pki/etcd/ca.pem
certFile: /etc/kubernetes/pki/etcd/client.pem
keyFile: /etc/kubernetes/pki/etcd/client-key.pem
networking:
networking:
podSubnet: <podCIDR>
apiServerCertSANs:
- <load-balancer-ip>
apiServerExtraArgs:
apiServerCertSANs:
- <load-balancer-ip>
apiServerExtraArgs:
apiserver-count: "3"
EOF
```
EOF
```
Ensure that the following placeholders are replaced:
Ensure that the following placeholders are replaced:
- `<private-ip>` with the private IPv4 of the master server.
- `<etcd0-ip>`, `<etcd1-ip>` and `<etcd2-ip>` with the IP addresses of your three etcd nodes
- `<podCIDR>` with your Pod CIDR. Please read the [CNI network section](/docs/setup/independent/create-cluster-kubeadm/#pod-network) of the docs for more information. Some CNI providers do not require a value to be set.
- `<load-balancer-ip>` with the virtual IP set up in the load balancer. Please read [setting up a master load balancer](/docs/setup/independent/high-availability/#set-up-master-load-balancer) section of the docs for more information.
- `<private-ip>` with the private IPv4 of the master server.
- `<etcd0-ip>`, `<etcd1-ip>` and `<etcd2-ip>` with the IP addresses of your three etcd nodes
- `<podCIDR>` with your Pod CIDR. Please read the [CNI network section](/docs/setup/independent/create-cluster-kubeadm/#pod-network) of the docs for more information. Some CNI providers do not require a value to be set.
- `<load-balancer-ip>` with the virtual IP set up in the load balancer. Please read [setting up a master load balancer](/docs/setup/independent/high-availability/#set-up-master-load-balancer) section of the docs for more information.
**Note:** If you are using Kubernetes 1.9+, you can replace the `apiserver-count: 3` extra argument with `endpoint-reconciler-type: lease`. For more information, see [the documentation](/docs/admin/high-availability/#endpoint-reconciler).
{{< note >}}**Note:** If you are using Kubernetes 1.9+, you can replace the `apiserver-count: 3` extra argument with `endpoint-reconciler-type: lease`. For more information, see [the documentation](/docs/admin/high-availability/#endpoint-reconciler).{{< /note >}}
1. When this is done, run kubeadm:
```bash
kubeadm init --config=config.yaml
```
1. When this is done, run kubeadm:
```bash
kubeadm init --config=config.yaml
```
## Run kubeadm init on master1 and master2
Before running kubeadm on the other masters, you need to first copy the K8s CA cert from `master0`. To do this, you have two options:
#### Option 1: Copy with scp
### Option 1: Copy with scp
1. Follow the steps in the [create ssh access](#create-ssh-access) section, but instead of adding to `etcd0`'s `authorized_keys` file, add them to `master0`.
1. Once you've done this, run:
@ -497,7 +497,7 @@ Before running kubeadm on the other masters, you need to first copy the K8s CA c
rm apiserver.*
```
#### Option 2: Copy paste
### Option 2: Copy paste
Copy the contents of `/etc/kubernetes/pki/ca.crt`, `/etc/kubernetes/pki/ca.key`, `/etc/kubernetes/pki/sa.key` and `/etc/kubernetes/pki/sa.pub` and create these files manually on `master1` and `master2`.