<p>As per the official documentation <a href="http://kubernetes.io/docs/getting-started-guides/docker/" rel="nofollow">here</a> on running Kubernetes locally within a Container -- I have followed all the steps carefully, and I am still getting the message <code>connection refused</code> when I type <code>kubectl get nodes</code>. </p>

<p><code>docker ps</code> shows that <em>api-server</em> is not running, and <code>docker logs kubelet</code> does indeed varify so:</p>

<pre><code>[kubelet.go:1137] Unable to register 127.0.0.1 with the apiserver: Post http://localhost:8080/api/v1/nodes: dial tcp 127.0.0.1:8080: connection refused.
</code></pre>

<p>After a little while, <code>docker logs kubelet</code></p>

<pre><code>E0711 16:07:06.814735   33792 event.go:202] 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)
</code></pre>

<p>Apparently, I am not alone in experiencing this problem. </p>

<hr>

<p>UPDATE:
After several hours, <code>docker logs kubelet</code></p>

<pre><code>E0712 08:28:03.528010   33792 pod_workers.go:138] Error syncing pod 4c6ab43ac4ee970e1f563d76ab3d3ec9, skipping: [failed to "StartContainer" for "controller-manager" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=controller-manager pod=k8s-master-127.0.0.1_default(4c6ab43ac4ee970e1f563d76ab3d3ec9)"
, failed to "StartContainer" for "apiserver" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=apiserver pod=k8s-master-127.0.0.1_default(4c6ab43ac4ee970e1f563d76ab3d3ec9)"
, failed to "StartContainer" for "setup" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=setup pod=k8s-master-127.0.0.1_default(4c6ab43ac4ee970e1f563d76ab3d3ec9)"
]
</code></pre>

<p>The easiest way to run Kubernetes locally now is <a href="http://kubernetes.io/docs/getting-started-guides/minikube/" rel="nofollow">Minikube</a>, though I'd expect the local docker method to still be functional.</p>

<p>Does <code>docker ps -a</code> show any crashed kube-apiserver containers that might have any clues in their logs?</p>
