<p>I deployed Kubernetes v1.15.2 dashboard successfully. Checking the cluster info:</p>

<pre><code>$ kubectl cluster-info
Kubernetes master is running at http://172.19.104.231:8080
kubernetes-dashboard is running at http://172.19.104.231:8080/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
</code></pre>

<p>When I access the dashboard, the result is:</p>

<pre><code>[root@ops001 ~]# curl -L http://172.19.104.231:8080/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy
Error: 'dial tcp 172.17.0.6:8443: connect: connection refused'
Trying to reach: 'https://172.17.0.6:8443/'
</code></pre>

<p>This is dashboard status:</p>

<pre><code>[root@ops001 ~]# kubectl get pods --namespace kube-system
NAME                                   READY   STATUS    RESTARTS   AGE
kubernetes-dashboard-74d7cc788-mk9c7   1/1     Running   0          92m
</code></pre>

<p>What should I do to access the dashboard? When I using proxy to access dashboard UI:</p>

<pre><code>$ kubectl proxy --address='localhost' --port=8086 --accept-hosts='^*$'
Starting to serve on 127.0.0.1:8086
</code></pre>

<p>the result is:</p>

<pre><code>[root@ops001 ~]# curl -L http://127.0.0.1:8086/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy
Error: 'dial tcp 172.17.0.6:8443: connect: connection refused'
Trying to reach: 'https://172.17.0.6:8443/'
</code></pre>

<p>What should I do to fix this problem?</p>

Dolphin
<p>I finally find the problem is kubernetes dashboard pod container does not communicate with the proxy nginx container. Because the proxy container is deployed before kubernetes flannel,and not in the same network.Trying to add proxy nginx container to flannel network would solve the problem.Check current flannel network:</p>

<pre><code>[root@ops001 conf.d]# cat /run/flannel/subnet.env
FLANNEL_NETWORK=172.30.0.0/16
FLANNEL_SUBNET=172.30.224.1/21
FLANNEL_MTU=1450
FLANNEL_IPMASQ=true
</code></pre>

<p>generate start parameter of docker:</p>

<pre><code>./mk-docker-opts.sh -d /run/docker_opts.env -c
</code></pre>

<p>check the parameter:</p>

<pre><code>[root@ops001 conf.d] cat /run/docker_opts.env
DOCKER_OPTS=" --bip=172.30.224.1/21 --ip-masq=false --mtu=1450"
</code></pre>

<p>add paramter to docker service:</p>

<pre><code># vim /lib/systemd/system/docker.service

EnvironmentFile=/run/docker_opts.env
ExecStart=/usr/bin/dockerd $DOCKER_OPTS -H fd://
</code></pre>

<p>restart docker and the container would join the flannel network,could communicate with each other:</p>

<pre><code>systemctl daemon-reload
systemctl restart docker
</code></pre>

<p>hope this may help you!</p>
