<p>tried to config one master node following the guide (<a href="http://kubernetes.io/v1.1/docs/getting-started-guides/docker-multinode.html#master-node" rel="nofollow">http://kubernetes.io/v1.1/docs/getting-started-guides/docker-multinode.html#master-node</a>) 
script master.sh ran successfully, but the api server failed to boot up.
Software Version:</p>

<pre><code>K8S_VERSION=1.1.3
ETCD_VERSION=2.2.1
FLANNEL_VERSION=0.5.5
</code></pre>

<p>OS Version:</p>

<pre><code>VERSION="2015.09"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2015.09"
PRETTY_NAME="Amazon Linux AMI 2015.09"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2015.09:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
</code></pre>

<p>Docker: 1.7.1</p>

<p>Kernel Version:</p>

<pre><code>Linux ip-172-0-11-22 4.1.10-17.31.amzn1.x86_64 #1 SMP Sat Oct 24 01:31:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
</code></pre>

<p>log message of kubelet:</p>

<pre><code>I0113 15:44:42.517777 7987 server.go:770] Started kubelet
E0113 15:44:42.517812 7987 kubelet.go:756] Image garbage collection failed: unable to find data for container /
E0113 15:44:42.518437 7987 event.go:197] Unable to write event: 'Post http://localhost:8080/api/v1/namespaces/default/events: dial tcp 127.0.0.1:8080: connection refused' (may retry after sleeping)
I0113 15:44:42.518460 7987 server.go:89] Starting to listen read-only on 0.0.0.0:10255
I0113 15:44:42.518885 7987 server.go:72] Starting to listen on 0.0.0.0:10250
I0113 15:44:42.524222 7987 kubelet.go:777] Running in container "/kubelet"
I0113 15:44:42.696510 7987 factory.go:239] Registering Docker factory
I0113 15:44:42.698516 7987 factory.go:93] Registering Raw factory
I0113 15:44:42.698837 7987 kubelet.go:2300] Recording NodeHasSufficientDisk event message for node localhost
I0113 15:44:42.698862 7987 kubelet.go:2300] Recording NodeReady event message for node localhost
I0113 15:44:42.698871 7987 kubelet.go:869] Attempting to register node localhost
I0113 15:44:42.699523 7987 kubelet.go:872] Unable to register localhost with the apiserver: Post http://localhost:8080/api/v1/nodes: dial tcp 127.0.0.1:8080: connection refused
I0113 15:44:42.829361 7987 manager.go:1006] Started watching for new ooms in manager
I0113 15:44:42.830001 7987 oomparser.go:183] oomparser using systemd
I0113 15:44:42.842667 7987 manager.go:250] Starting recovery of all containers
I0113 15:44:42.868829 7987 manager.go:255] Recovery completed
I0113 15:44:42.880876 7987 container_manager_linux.go:215] Configure resource-only container /docker-daemon with memory limit: 2903034265
I0113 15:44:42.880910 7987 manager.go:104] Starting to sync pod status with apiserver
I0113 15:44:42.880963 7987 kubelet.go:1960] Starting kubelet main sync loop.
I0113 15:44:42.881004 7987 kubelet.go:2012] SyncLoop (ADD): "k8s-master-localhost_default"
E0113 15:44:42.881457 7987 kubelet.go:1915] error getting node: node 'localhost' is not in cache
E0113 15:44:42.884752 7987 kubelet.go:1356] Failed creating a mirror pod "k8s-master-localhost_default": Post http://localhost:8080/api/v1/namespaces/default/pods: dial tcp 127.0.0.1:8080: connection refused
E0113 15:44:42.884780 7987 kubelet.go:1361] Mirror pod not available
I0113 15:44:42.884839 7987 manager.go:1707] Need to restart pod infra container for "k8s-master-localhost_default" because it is not found
W0113 15:44:42.885688 7987 manager.go:108] Failed to updated pod status: error updating status for pod "k8s-master-localhost_default": Get http://localhost:8080/api/v1/namespaces/default/pods/k8s-master-localhost: dial tcp 127.0.0.1:8080: connection refused
I0113 15:44:42.900665 7987 kubelet.go:2300] Recording NodeHasSufficientDisk event message for node localhost
I0113 15:44:42.900693 7987 kubelet.go:2300] Recording NodeReady event message for node localhost
I0113 15:44:42.900751 7987 kubelet.go:869] Attempting to register node localhost
I0113 15:44:42.901194 7987 kubelet.go:872] Unable to register localhost with the apiserver: Post http://localhost:8080/api/v1/nodes: dial tcp 127.0.0.1:8080: connection refused
I0113 15:44:42.977270 7987 provider.go:91] Refreshing cache for provider: *credentialprovider.defaultDockerConfigProvider
I0113 15:44:42.977458 7987 docker.go:159] Pulling image gcr.io/google_containers/pause:0.8.0 without credentials
I0113 15:44:43.302487 7987 kubelet.go:2300] Recording NodeHasSufficientDisk event message for node localhost
I0113 15:44:43.302552 7987 kubelet.go:2300] Recording NodeReady event message for node localhost
</code></pre>

<p>First, I would upgrade to a newer Docker Version.</p>

<p>But I think the Problem has something to do with your kubelet configuration.</p>

<p>The parameter --hostname-override allows you to override the hostname.
I'm not 100% sure, but I think your node has to be accessible via the hostname from the kube-api server. If you api-server is on another node, localhost won't work. </p>

<p>See: <a href="http://kubernetes.io/v1.1/docs/admin/kubelet.html" rel="nofollow">http://kubernetes.io/v1.1/docs/admin/kubelet.html</a> for more Information</p>
