From 7ff7b27be8ef2d59ff5099cf1df3ba952705d7f9 Mon Sep 17 00:00:00 2001 From: Takeaki Matsumoto Date: Fri, 22 Jun 2018 22:58:04 +0900 Subject: [PATCH] Update etcd config description of kubeadm HA doc (#9178) * Update etcd config description of kubeadm HA doc - Fix url from http to https - Add etcd-listen-ip description * Edit for clarity and list markup * More minor edits --- .../setup/independent/high-availability.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/content/en/docs/setup/independent/high-availability.md b/content/en/docs/setup/independent/high-availability.md index ceff01d0ed..a589c4384d 100644 --- a/content/en/docs/setup/independent/high-availability.md +++ b/content/en/docs/setup/independent/high-availability.md @@ -244,14 +244,14 @@ Please select one of the tabs to see installation instructions for the respectiv LimitNOFILE=40000 TimeoutStartSec=0 - ExecStart=/usr/local/bin/etcd --name --data-dir /var/lib/etcd --listen-client-urls http://localhost:2379 --advertise-client-urls http://localhost:2379 --listen-peer-urls http://localhost:2380 --initial-advertise-peer-urls http://localhost:2380 --cert-file=/etc/kubernetes/pki/etcd/server.pem --key-file=/etc/kubernetes/pki/etcd/server-key.pem --client-cert-auth --trusted-ca-file=/etc/kubernetes/pki/etcd/ca.pem --peer-cert-file=/etc/kubernetes/pki/etcd/peer.pem --peer-key-file=/etc/kubernetes/pki/etcd/peer-key.pem --peer-client-cert-auth --peer-trusted-ca-file=/etc/kubernetes/pki/etcd/ca.pem --initial-cluster =https://:2380,=https://:2380,=https://:2380 --initial-cluster-token my-etcd-token --initial-cluster-state new + ExecStart=/usr/local/bin/etcd --name --data-dir /var/lib/etcd --listen-client-urls https://:2379 --advertise-client-urls https://:2379 --listen-peer-urls https://:2380 --initial-advertise-peer-urls https://:2380 --cert-file=/etc/kubernetes/pki/etcd/server.pem --key-file=/etc/kubernetes/pki/etcd/server-key.pem --client-cert-auth --trusted-ca-file=/etc/kubernetes/pki/etcd/ca.pem --peer-cert-file=/etc/kubernetes/pki/etcd/peer.pem --peer-key-file=/etc/kubernetes/pki/etcd/peer-key.pem --peer-client-cert-auth --peer-trusted-ca-file=/etc/kubernetes/pki/etcd/ca.pem --initial-cluster =https://:2380,=https://:2380,=https://:2380 --initial-cluster-token my-etcd-token --initial-cluster-state new [Install] WantedBy=multi-user.target EOF ``` - Make sure you replace ``, `` and `` with the appropriate IPv4 addresses. Replace `` with the name of this etcd member. Modify the values of `--listen-client-urls`, `--advertise-client-urls`, `--listen-peer-urls` and `--initial-advertise-peer-urls` if needed. Replace ``, `` and `` with real hostnames of each machine. These machines must be able to reach every other using DNS or make sure that records are added to `/etc/hosts`. + Make sure you replace ``, `` and `` with the appropriate IPv4 addresses. Replace `` with the name of this etcd member. Replace `` with the IPv4 address of this etcd node. Replace ``, `` and `` with real hostnames of each machine. These machines must be able to reach each other using DNS or by adding records to `/etc/hosts`. 1. Finally, launch etcd: ```bash @@ -285,10 +285,10 @@ Run the following to generate the manifest file: - command: - etcd --name - --data-dir /var/lib/etcd - - --listen-client-urls http://localhost:2379 - - --advertise-client-urls http://localhost:2379 - - --listen-peer-urls http://localhost:2380 - - --initial-advertise-peer-urls http://localhost:2380 + - --listen-client-urls https://:2379 + - --advertise-client-urls https://:2379 + - --listen-peer-urls https://:2380 + - --initial-advertise-peer-urls https://:2380 - --cert-file=/certs/server.pem - --key-file=/certs/server-key.pem - --client-cert-auth @@ -339,8 +339,11 @@ Run the following to generate the manifest file: EOF Make sure you replace: -* `` with the name of the node you're running on (e.g. `etcd0`, `etcd1` or `etcd2`) + +* `` with the name of the node you're running on (for example, `etcd0`, `etcd1` or `etcd2`) +* `` with the public IPv4 address of the node you're running on * ``, `` and `` with the public IPv4s of the other machines that host etcd. + {{% /tab %}} {{< /tabs >}} @@ -400,7 +403,7 @@ As an example we outline a simple setup based on keepalived. Depending on enviro } ``` - In the section `vrrp_instance VI_1`, change few lines depending on your setup: + In the section `vrrp_instance VI_1`, change the following lines depending on your setup: * `state` is either `MASTER` (on the first master nodes) or `BACKUP` (the other master nodes). * `interface` is the name of an existing public interface to bind the virtual IP to (usually the primary interface).