Fix rendering issues in high-availability topic (#8663)
This commit is contained in:
parent
6094a7ea6e
commit
6608a4c76c
|
@ -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}
|
## Run kubeadm init on master0 {#kubeadm-init-master0}
|
||||||
|
|
||||||
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:
|
||||||
```bash
|
```none
|
||||||
cat >config.yaml <<EOF
|
cat >config.yaml <<EOF
|
||||||
apiVersion: kubeadm.k8s.io/v1alpha1
|
apiVersion: kubeadm.k8s.io/v1alpha1
|
||||||
kind: MasterConfiguration
|
kind: MasterConfiguration
|
||||||
api:
|
api:
|
||||||
advertiseAddress: <private-ip>
|
advertiseAddress: <private-ip>
|
||||||
etcd:
|
etcd:
|
||||||
endpoints:
|
endpoints:
|
||||||
- https://<etcd0-ip-address>:2379
|
- https://<etcd0-ip-address>:2379
|
||||||
- https://<etcd1-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
|
caFile: /etc/kubernetes/pki/etcd/ca.pem
|
||||||
certFile: /etc/kubernetes/pki/etcd/client.pem
|
certFile: /etc/kubernetes/pki/etcd/client.pem
|
||||||
keyFile: /etc/kubernetes/pki/etcd/client-key.pem
|
keyFile: /etc/kubernetes/pki/etcd/client-key.pem
|
||||||
networking:
|
networking:
|
||||||
podSubnet: <podCIDR>
|
podSubnet: <podCIDR>
|
||||||
apiServerCertSANs:
|
apiServerCertSANs:
|
||||||
- <load-balancer-ip>
|
- <load-balancer-ip>
|
||||||
apiServerExtraArgs:
|
apiServerExtraArgs:
|
||||||
apiserver-count: "3"
|
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.
|
- `<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
|
- `<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.
|
- `<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.
|
- `<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:
|
1. When this is done, run kubeadm:
|
||||||
```bash
|
```bash
|
||||||
kubeadm init --config=config.yaml
|
kubeadm init --config=config.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run kubeadm init on master1 and master2
|
## 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:
|
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. 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:
|
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.*
|
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`.
|
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`.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue