<p dir="auto">I tried to set up kubernetes locally via Docker according to <a href="http://kubernetes.io/docs/getting-started-guides/docker/" rel="nofollow">http://kubernetes.io/docs/getting-started-guides/docker/</a></p>
<p dir="auto">I ran into the following problems:</p>
<ol dir="auto">
<li>kubedns was not running (only 2 of the three containers in the DNS pod were coming up)</li>
<li>Dashboard was not running</li>
</ol>
<h2 dir="auto">kubedns problem</h2>
<p dir="auto">The kubedns container in the kubedns pod wrote the following logs</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="...
I0719 08:24:17.689766       1 dns.go:172] Ignoring error while waiting for service default/kubernetes: serializer for text/html; charset=utf-8 doesn't exist. Sleeping 1s before retrying.
E0719 08:24:17.690289       1 reflector.go:216] pkg/dns/dns.go:155: Failed to list *api.Service: serializer for text/html; charset=utf-8 doesn't exist
E0719 08:24:18.370902       1 reflector.go:216] pkg/dns/dns.go:154: Failed to list *api.Endpoints: serializer for text/html; charset=utf-8 doesn't exist
I0719 08:24:18.692780       1 dns.go:172] Ignoring error while waiting for service default/kubernetes: serializer for text/html; charset=utf-8 doesn't exist. Sleeping 1s before retrying.
E0719 08:24:18.693100       1 reflector.go:216] pkg/dns/dns.go:155: Failed to list *api.Service: serializer for text/html; charset=utf-8 doesn't exist
I0719 08:24:19.369996       1 dns.go:439] Received DNS Request:kubernetes.default.svc.cluster.local., exact:false
I0719 08:24:19.370082       1 dns.go:539] records:[], retval:[], path:[local cluster svc default kubernetes]
I0719 08:24:19.370647       1 dns.go:439] Received DNS Request:kubernetes.default.svc.cluster.local., exact:false
I0719 08:24:19.370703       1 dns.go:539] records:[], retval:[], path:[local cluster svc default kubernetes]
E0719 08:24:19.469504       1 reflector.go:216] pkg/dns/dns.go:154: Failed to list *api.Endpoints: serializer for text/html; charset=utf-8 doesn't exist
E0719 08:24:19.876888       1 reflector.go:216] pkg/dns/dns.go:155: Failed to list *api.Service: serializer for text/html; charset=utf-8 doesn't exist
I0719 08:24:19.876947       1 dns.go:172] Ignoring error while waiting for service default/kubernetes: serializer for text/html; charset=utf-8 doesn't exist. Sleeping 1s before retrying.
E0719 08:24:20.569325       1 reflector.go:216] pkg/dns/dns.go:154: Failed to list *api.Endpoints: serializer for text/html; charset=utf-8 doesn't exist
E0719 08:24:21.170742       1 reflector.go:216] pkg/dns/dns.go:155: Failed to list *api.Service: serializer for text/html; charset=utf-8 doesn't exist
I0719 08:24:21.171316       1 dns.go:172] Ignoring error while waiting for service default/kubernetes: serializer for text/html; charset=utf-8 doesn't exist. Sleeping 1s before retrying.
F0719 08:24:21.473908       1 server.go:127] Received signal: terminated"><pre class="notranslate"><code class="notranslate">...
I0719 08:24:17.689766       1 dns.go:172] Ignoring error while waiting for service default/kubernetes: serializer for text/html; charset=utf-8 doesn't exist. Sleeping 1s before retrying.
E0719 08:24:17.690289       1 reflector.go:216] pkg/dns/dns.go:155: Failed to list *api.Service: serializer for text/html; charset=utf-8 doesn't exist
E0719 08:24:18.370902       1 reflector.go:216] pkg/dns/dns.go:154: Failed to list *api.Endpoints: serializer for text/html; charset=utf-8 doesn't exist
I0719 08:24:18.692780       1 dns.go:172] Ignoring error while waiting for service default/kubernetes: serializer for text/html; charset=utf-8 doesn't exist. Sleeping 1s before retrying.
E0719 08:24:18.693100       1 reflector.go:216] pkg/dns/dns.go:155: Failed to list *api.Service: serializer for text/html; charset=utf-8 doesn't exist
I0719 08:24:19.369996       1 dns.go:439] Received DNS Request:kubernetes.default.svc.cluster.local., exact:false
I0719 08:24:19.370082       1 dns.go:539] records:[], retval:[], path:[local cluster svc default kubernetes]
I0719 08:24:19.370647       1 dns.go:439] Received DNS Request:kubernetes.default.svc.cluster.local., exact:false
I0719 08:24:19.370703       1 dns.go:539] records:[], retval:[], path:[local cluster svc default kubernetes]
E0719 08:24:19.469504       1 reflector.go:216] pkg/dns/dns.go:154: Failed to list *api.Endpoints: serializer for text/html; charset=utf-8 doesn't exist
E0719 08:24:19.876888       1 reflector.go:216] pkg/dns/dns.go:155: Failed to list *api.Service: serializer for text/html; charset=utf-8 doesn't exist
I0719 08:24:19.876947       1 dns.go:172] Ignoring error while waiting for service default/kubernetes: serializer for text/html; charset=utf-8 doesn't exist. Sleeping 1s before retrying.
E0719 08:24:20.569325       1 reflector.go:216] pkg/dns/dns.go:154: Failed to list *api.Endpoints: serializer for text/html; charset=utf-8 doesn't exist
E0719 08:24:21.170742       1 reflector.go:216] pkg/dns/dns.go:155: Failed to list *api.Service: serializer for text/html; charset=utf-8 doesn't exist
I0719 08:24:21.171316       1 dns.go:172] Ignoring error while waiting for service default/kubernetes: serializer for text/html; charset=utf-8 doesn't exist. Sleeping 1s before retrying.
F0719 08:24:21.473908       1 server.go:127] Received signal: terminated
</code></pre></div>
<p dir="auto">and it was repeatedly restarted (health check also did not work!)</p>
<h2 dir="auto">Dashboard problem</h2>
<p dir="auto">The dashboard was restarted over and over again with the following log:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Starting HTTP server on port 9090
Creating API server client for http://localhost:8080
Error while initializing connection to Kubernetes apiserver. This most likely means that the cluster is misconfigured (e.g., it has invalid apiserver certificates or service accounts configuration) or the --apiserver-host param points to a server that does not exist. Reason: Get http://localhost:8080/version: dial tcp [::1]:8080: getsockopt: connection refused"><pre class="notranslate"><code class="notranslate">Starting HTTP server on port 9090
Creating API server client for http://localhost:8080
Error while initializing connection to Kubernetes apiserver. This most likely means that the cluster is misconfigured (e.g., it has invalid apiserver certificates or service accounts configuration) or the --apiserver-host param points to a server that does not exist. Reason: Get http://localhost:8080/version: dial tcp [::1]:8080: getsockopt: connection refused
</code></pre></div>
<h2 dir="auto">Work around</h2>
<p dir="auto">Just drop the two lines</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--cluster-dns=10.0.0.10 \
--cluster-domain=cluster.local \"><pre class="notranslate"><code class="notranslate">--cluster-dns=10.0.0.10 \
--cluster-domain=cluster.local \
</code></pre></div>
<p dir="auto">from the k8s Docker container start. Then everything starts up nicely!</p>
<h2 dir="auto">Working start up script</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#!/bin/bash

set -eu

: ${ARCH:=&quot;amd64&quot;}
: ${K8S_VERSION:=&quot;v1.3.2&quot;}

exec docker run -d \
    --volume=/:/rootfs:ro \
    --volume=/sys:/sys:rw \
    --volume=/var/lib/docker/:/var/lib/docker:rw \
    --volume=/var/lib/kubelet/:/var/lib/kubelet:rw \
    --volume=/var/run:/var/run:rw \
    --net=host \
    --pid=host \
    --privileged \
    gcr.io/google_containers/hyperkube-${ARCH}:${K8S_VERSION} \
    /hyperkube kubelet \
        --containerized \
        --hostname-override=127.0.0.1 \
        --api-servers=http://localhost:8080 \
        --config=/etc/kubernetes/manifests \
        --allow-privileged --v=2"><pre class="notranslate"><code class="notranslate">#!/bin/bash

set -eu

: ${ARCH:="amd64"}
: ${K8S_VERSION:="v1.3.2"}

exec docker run -d \
    --volume=/:/rootfs:ro \
    --volume=/sys:/sys:rw \
    --volume=/var/lib/docker/:/var/lib/docker:rw \
    --volume=/var/lib/kubelet/:/var/lib/kubelet:rw \
    --volume=/var/run:/var/run:rw \
    --net=host \
    --pid=host \
    --privileged \
    gcr.io/google_containers/hyperkube-${ARCH}:${K8S_VERSION} \
    /hyperkube kubelet \
        --containerized \
        --hostname-override=127.0.0.1 \
        --api-servers=http://localhost:8080 \
        --config=/etc/kubernetes/manifests \
        --allow-privileged --v=2
</code></pre></div>
<p dir="auto"><a href="http://kubekins.dls.corp.google.com:8081/job/kubernetes-pull-build-test-e2e-gce/28687/" rel="nofollow">http://kubekins.dls.corp.google.com:8081/job/kubernetes-pull-build-test-e2e-gce/28687/</a></p>
<p dir="auto">In the e2e test, the last three tests failed:</p>
<ul dir="auto">
<li>Kubernetes e2e suite.Downward API volume should update labels on modification [Conformance]</li>
<li>Kubernetes e2e suite.Services should be able to change the type and ports of a service</li>
<li>Kubernetes e2e suite.Networking should provide Internet connection for containers [Conformance]</li>
</ul>
<p dir="auto">All these tests failed because at the end of the e2e test, the node <code class="notranslate">e2e-gce-builder-2-2-minion-fz40</code> became not ready.<br>
From <a href="https://00e9e64bac678b6b851b94ed815af525b4b7dcc3692f0d0478-apidata.googleusercontent.com/download/storage/v1_internal/b/kubernetes-jenkins/o/pr-logs%2Fpull%2F21120%2Fkubernetes-pull-build-test-e2e-gce%2F28687%2Fartifacts%2F146.148.87.92:22-kubelet.log?qk=AD5uMEsyAJ1ZzX_lYtrc_hkS6bQpxh-aM4X3tnQhta23cO-84jM76gPaeKE-vbfXUQYbb9PzX_WchlvCPC_l4_6WZooIlknttyt4_d-ulto9OjTfg9hw3jsMhkSoOsNBs-qQ85bVkH5O9YvXntPiaIVWQxZh8Q-6Hx7uQEMCkVRdZE5XmO35yPXYF52E6o0UgHTejIMCxnDHCoYQ_gr7PDJ7dbuaI6lLIlFvP9vD5Wmofbz34jGXS-W5z6J2DgnewO5zvRxaK4tQb3soiEGrqLlDZazco6ABuXDl4nWxTw2FDv1QxQ4pkYZtS5yGr7QqaC4SC1GgxZj08Aw7F9njT8kDM4FmkXySHlPpsjgkIOL9nfYJ2sn5Bpb_1MuY1IQTYGqrNnhPTi8OUb6mPYVHW6ka2GI5XTku8od9Zj1zi6t_quF1re716CQQ7YQE_dQgS0bYo4qw4cybjoA5qaxU_rR22Oj9aESGaS9Ek2bfMrMnD-CVtMCy02R--2otRmMWKtQbbr9QTuE2EPTwbMjQuRX2zRV1Cgr7fspvBmsfzGtxnuIY54a0JV3y_QJvCIW5wX-wVL_2bpBG1rD26gf4sS4k9jNjg-lVuXu6hAha4xXro9pXKFxFUEm7C-MoUMG7zCTEXsKZIE-qGLhsCaE6EwbcaVoWqQjc-wgJrrloU2Q-mthQ3SsOjxOy5aO-kOeU_2fTcc4JiBCUvaBelmEtATOZmQBncNO6CdbZtyF7zUpZ7Qxsjv6OmHzg7pE4IqMex2UEznzKOiIfMBSmFKpfrGZUqdGfIaSq3qAj9oSg6-CHbpqQ-UPLm2Zy8TnykdHJ14Yf31MqbNTO3RQyE7pFbba7sgDLu7BdsQty5zDUUmSl12Dqx9da2lQ9mrbJ10EVTJlO9t5InvzwtvGHnqOoF_rEBans2TtopZ2MScRzOiaVbEzR8t8XWavEPFYzZt53DJAR7DQVmG8P" rel="nofollow">kubelet.log</a>, we can see that kubelet can't detect docker daemon suddenly:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E0216 01:08:25.357402    3938 kubelet.go:2617] Container runtime sanity check failed: docker: failed to get docker version: Get http://unix.sock/version: dial unix /var/run/docker.sock: no such file or directory"><pre class="notranslate"><code class="notranslate">E0216 01:08:25.357402    3938 kubelet.go:2617] Container runtime sanity check failed: docker: failed to get docker version: Get http://unix.sock/version: dial unix /var/run/docker.sock: no such file or directory
</code></pre></div>
<p dir="auto">Here is <a href="https://00e9e64baca938b4a3ca1c6398e73fb4b04c0790cd0ff2b701-apidata.googleusercontent.com/download/storage/v1_internal/b/kubernetes-jenkins/o/pr-logs%2Fpull%2F21120%2Fkubernetes-pull-build-test-e2e-gce%2F28687%2Fartifacts%2F146.148.87.92:22-supervisord.log?qk=AD5uMEumtu2kd2_vY3MJLG212-xF_ztoChgKcBDBY36DBGY_yCh7ezvgfbnkh-CCMqrFE4zb7U6QR7rbjbYkyX2mvFs55Ni_8Yi8KiFFWvQ65VNXRzrun8AmzYsue26E6U-Q62N3BmWFsHYGLeaocgpsTPnldl_VieisK438GCIYtUAb6P9gBfu-3lyLwgiTyBsunnki4xz3c2Culn5XudY7IiizyipvDr_vZxj5IDzXdnK2gRU4oqaaQ3GOUXOWCRhaFfSX1EOyggM5caDKufQtBqKdoc_rz_rBX37c6PQAU9IeTk41p9y72CWYpq-GltRPoqG8xPdRdi1CtRG3J7W22nZkvz4KYPKqzHXV2Dhmch6l-PNt0Kp54sv88I_mkem68T-FoDk7oZknBlQEJfCAwWgvV3IzeX2FDClBtueHrZTnOudLc_GK1XaMcq3tIrQlNTAdTGl8IbGjlVrVMDoA0HRHZANW_oCWtzK-sW3e4tSmoV9qYDK9I4dY6Wr022_qoMd-jBZ6QR7_MY92vtfm1F_83yQB8zRAZR-aIc6Re0DfUQuP0i-FQr0QFEJUg1ipZx8FnxlzVOVeRyP6QKDEWjRd0v4QkrBVZOTX5aQtiBSPy5CG33lhPDpN4uZdvdbjiAkcK2wOcXyziV4iXcqvlHoYHDSjjjBib4Zi1flAYDf7vsYGUQq4raJ1DcefYRq_wHBR5vHHT-pMVne7HT8y9wfrH8phpOqmoDrljcocqWjPI9Hz78CLgPCtnDggllncVgDFXshI-iVmy4h5E6HrBb6hSYnyNVGT3UQ_g-amxn2nHcqlzUQGyvTtwnOLr6GMeNnphzcNvQmKIoUvZhN9K8W3wq-3tGabNLeQmCvXsuqOklkhIB9fgbSdnKAwxmPSfquPX6n6K2K7WR2tjteVS2w1KDA_NFkPBP-W_EwrUBxA5JeGoQy6vvRzKqRmOZ1wcWsGJmOLfFlB_BKh_0PP0qcw3s2Q_Q" rel="nofollow">supervisord log</a>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2016-02-16 01:00:38,864 CRIT Supervisor running as root (no user in config file)
2016-02-16 01:00:38,930 INFO RPC interface 'supervisor' initialized
2016-02-16 01:00:38,931 WARN cElementTree not installed, using slower XML parser for XML-RPC
2016-02-16 01:00:38,931 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-02-16 01:00:38,932 INFO daemonizing the supervisord process
2016-02-16 01:00:38,932 INFO supervisord started with pid 2340
2016-02-16 01:02:16,760 WARN received SIGTERM indicating exit request
2016-02-16 01:02:21,811 CRIT Supervisor running as root (no user in config file)
2016-02-16 01:02:21,811 WARN Included extra file &quot;/etc/supervisor/conf.d/kubelet.conf&quot; during parsing
2016-02-16 01:02:21,811 WARN Included extra file &quot;/etc/supervisor/conf.d/docker.conf&quot; during parsing
2016-02-16 01:02:21,831 INFO RPC interface 'supervisor' initialized
2016-02-16 01:02:21,831 WARN cElementTree not installed, using slower XML parser for XML-RPC
2016-02-16 01:02:21,831 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-02-16 01:02:21,832 INFO daemonizing the supervisord process
2016-02-16 01:02:21,833 INFO supervisord started with pid 3855
2016-02-16 01:02:22,835 INFO spawned: 'kubelet' with pid 3869
2016-02-16 01:02:22,837 INFO spawned: 'docker' with pid 3870
2016-02-16 01:02:23,894 INFO success: kubelet entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)
2016-02-16 01:02:23,894 INFO success: docker entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)
2016-02-16 01:08:16,756 INFO exited: docker (exit status 2; expected)
2016-02-16 01:08:17,758 INFO spawned: 'docker' with pid 21508
2016-02-16 01:08:18,783 INFO success: docker entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)
2016-02-16 01:09:17,820 INFO exited: docker (exit status 2; expected)
2016-02-16 01:09:18,822 INFO spawned: 'docker' with pid 21697
2016-02-16 01:09:19,847 INFO success: docker entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)
2016-02-16 01:10:38,852 INFO exited: docker (exit status 2; expected)
2016-02-16 01:10:39,854 INFO spawned: 'docker' with pid 21953
2016-02-16 01:10:40,884 INFO success: docker entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)
2016-02-16 01:11:59,885 INFO exited: docker (exit status 2; expected)
2016-02-16 01:12:00,887 INFO spawned: 'docker' with pid 22152
2016-02-16 01:12:01,916 INFO success: docker entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)
2016-02-16 01:12:54,256 INFO exited: kubelet (exit status 2; expected)
2016-02-16 01:12:55,258 INFO spawned: 'kubelet' with pid 22277
2016-02-16 01:12:56,301 INFO success: kubelet entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)
2016-02-16 01:13:20,921 INFO exited: docker (exit status 2; expected)
2016-02-16 01:13:21,923 INFO spawned: 'docker' with pid 22344
2016-02-16 01:13:22,951 INFO success: docker entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)
2016-02-16 01:13:55,308 INFO exited: kubelet (exit status 2; expected)
2016-02-16 01:13:56,310 INFO spawned: 'kubelet' with pid 22399
2016-02-16 01:13:57,355 INFO success: kubelet entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)"><pre class="notranslate"><code class="notranslate">2016-02-16 01:00:38,864 CRIT Supervisor running as root (no user in config file)
2016-02-16 01:00:38,930 INFO RPC interface 'supervisor' initialized
2016-02-16 01:00:38,931 WARN cElementTree not installed, using slower XML parser for XML-RPC
2016-02-16 01:00:38,931 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-02-16 01:00:38,932 INFO daemonizing the supervisord process
2016-02-16 01:00:38,932 INFO supervisord started with pid 2340
2016-02-16 01:02:16,760 WARN received SIGTERM indicating exit request
2016-02-16 01:02:21,811 CRIT Supervisor running as root (no user in config file)
2016-02-16 01:02:21,811 WARN Included extra file "/etc/supervisor/conf.d/kubelet.conf" during parsing
2016-02-16 01:02:21,811 WARN Included extra file "/etc/supervisor/conf.d/docker.conf" during parsing
2016-02-16 01:02:21,831 INFO RPC interface 'supervisor' initialized
2016-02-16 01:02:21,831 WARN cElementTree not installed, using slower XML parser for XML-RPC
2016-02-16 01:02:21,831 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-02-16 01:02:21,832 INFO daemonizing the supervisord process
2016-02-16 01:02:21,833 INFO supervisord started with pid 3855
2016-02-16 01:02:22,835 INFO spawned: 'kubelet' with pid 3869
2016-02-16 01:02:22,837 INFO spawned: 'docker' with pid 3870
2016-02-16 01:02:23,894 INFO success: kubelet entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)
2016-02-16 01:02:23,894 INFO success: docker entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)
2016-02-16 01:08:16,756 INFO exited: docker (exit status 2; expected)
2016-02-16 01:08:17,758 INFO spawned: 'docker' with pid 21508
2016-02-16 01:08:18,783 INFO success: docker entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)
2016-02-16 01:09:17,820 INFO exited: docker (exit status 2; expected)
2016-02-16 01:09:18,822 INFO spawned: 'docker' with pid 21697
2016-02-16 01:09:19,847 INFO success: docker entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)
2016-02-16 01:10:38,852 INFO exited: docker (exit status 2; expected)
2016-02-16 01:10:39,854 INFO spawned: 'docker' with pid 21953
2016-02-16 01:10:40,884 INFO success: docker entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)
2016-02-16 01:11:59,885 INFO exited: docker (exit status 2; expected)
2016-02-16 01:12:00,887 INFO spawned: 'docker' with pid 22152
2016-02-16 01:12:01,916 INFO success: docker entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)
2016-02-16 01:12:54,256 INFO exited: kubelet (exit status 2; expected)
2016-02-16 01:12:55,258 INFO spawned: 'kubelet' with pid 22277
2016-02-16 01:12:56,301 INFO success: kubelet entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)
2016-02-16 01:13:20,921 INFO exited: docker (exit status 2; expected)
2016-02-16 01:13:21,923 INFO spawned: 'docker' with pid 22344
2016-02-16 01:13:22,951 INFO success: docker entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)
2016-02-16 01:13:55,308 INFO exited: kubelet (exit status 2; expected)
2016-02-16 01:13:56,310 INFO spawned: 'kubelet' with pid 22399
2016-02-16 01:13:57,355 INFO success: kubelet entered RUNNING state, process has stayed up for &gt; than 1 seconds (startsecs)
</code></pre></div>
<p dir="auto">@kubernetes/sig-node</p>