Adding name arguement in kubeadm-config.yaml (#10948)

In AWS cloud platform, omitting the name while initializing etcd cluster
causes "Couldn't find local name "$HOSTNAME in the initial cluster configuration"

It seems that the etcd tries to find short hostname, not the FQDN hostname.
To avoid this, passing the name explicitly to etcd configuration solved the problem.

[related issue1](https://github.com/coreos/bugs/issues/2054)
[related issue2](https://github.com/kubernetes/kubeadm/issues/653)
This commit is contained in:
hongkunyoo
2018-11-17 02:16:57 +09:00
committed by k8s-ci-robot
parent 34b6eef1b8
commit cb88b43438
@@ -151,6 +151,7 @@ Optionally replace `stable` with a different version of Kubernetes, for example
etcd:
local:
extraArgs:
name: "CP0_HOSTNAME"
listen-client-urls: "https://127.0.0.1:2379,https://CP0_IP:2379"
advertise-client-urls: "https://CP0_IP:2379"
listen-peer-urls: "https://CP0_IP:2380"
@@ -230,6 +231,7 @@ Remember that your config may differ from this example.
etcd:
local:
extraArgs:
name: "CP1_HOSTNAME"
listen-client-urls: "https://127.0.0.1:2379,https://CP1_IP:2379"
advertise-client-urls: "https://CP1_IP:2379"
listen-peer-urls: "https://CP1_IP:2380"
@@ -320,6 +322,7 @@ Remember that your config may differ from this example.
etcd:
local:
extraArgs:
name: "CP2_HOSTNAME"
listen-client-urls: "https://127.0.0.1:2379,https://CP2_IP:2379"
advertise-client-urls: "https://CP2_IP:2379"
listen-peer-urls: "https://CP2_IP:2380"