<p>I try to run Kubernetes from Docker for Windows. After I click on <code>Enable Kubernetes</code> inside the <strong>Kubernetes</strong> Tab the <code>Kuberneters is starting...</code> process running into a endless state.</p>

<p>Take look in the <code>service.txt</code> log in <code>C:\ProgramData\DockerDesktop\pki</code>, Docker repeat the following log-block for the whole time.</p>

<pre><code>[10:23:26.068][ApiProxy          ][Error  ] time="2020-01-14T10:23:26+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:27.080][ApiProxy          ][Error  ] time="2020-01-14T10:23:27+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:28.071][ApiProxy          ][Error  ] time="2020-01-14T10:23:28+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:28.624][ApiProxy          ][Info   ] time="2020-01-14T10:23:28+01:00" msg="DNS failure: www-cache.\tIN\t A: errno 9002: DnsQuery: DNS-Serverfehler."
[10:23:28.626][ApiProxy          ][Info   ] time="2020-01-14T10:23:28+01:00" msg="DNS failure: www-cache.\tIN\t AAAA: errno 9002: DnsQuery: DNS-Serverfehler."
[10:23:29.068][ApiProxy          ][Error  ] time="2020-01-14T10:23:29+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:30.083][ApiProxy          ][Error  ] time="2020-01-14T10:23:30+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:31.088][ApiProxy          ][Error  ] time="2020-01-14T10:23:31+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:32.068][ApiProxy          ][Error  ] time="2020-01-14T10:23:32+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:32.715][ApiProxy          ][Info   ] time="2020-01-14T10:23:32+01:00" msg="DNS failure: www-cache.\tIN\t AAAA: errno 9002: DnsQuery: DNS-Serverfehler."
[10:23:32.717][ApiProxy          ][Info   ] time="2020-01-14T10:23:32+01:00" msg="DNS failure: www-cache.\tIN\t A: errno 9002: DnsQuery: DNS-Serverfehler."
[10:23:33.068][ApiProxy          ][Error  ] time="2020-01-14T10:23:33+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:34.074][ApiProxy          ][Error  ] time="2020-01-14T10:23:34+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:34.658][ApiProxy          ][Info   ] time="2020-01-14T10:23:34+01:00" msg="DNS failure: www-cache.\tIN\t A: errno 9002: DnsQuery: DNS-Serverfehler."
[10:23:34.661][ApiProxy          ][Info   ] time="2020-01-14T10:23:34+01:00" msg="DNS failure: www-cache.\tIN\t AAAA: errno 9002: DnsQuery: DNS-Serverfehler."
[10:23:35.069][ApiProxy          ][Error  ] time="2020-01-14T10:23:35+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:36.074][ApiProxy          ][Error  ] time="2020-01-14T10:23:36+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:37.070][ApiProxy          ][Error  ] time="2020-01-14T10:23:37+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:38.072][ApiProxy          ][Error  ] time="2020-01-14T10:23:38+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:39.072][ApiProxy          ][Error  ] time="2020-01-14T10:23:39+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:39.681][ApiProxy          ][Info   ] time="2020-01-14T10:23:39+01:00" msg="DNS failure: www-cache.\tIN\t AAAA: errno 9002: DnsQuery: DNS-Serverfehler."
[10:23:39.684][ApiProxy          ][Info   ] time="2020-01-14T10:23:39+01:00" msg="DNS failure: www-cache.\tIN\t A: errno 9002: DnsQuery: DNS-Serverfehler."
[10:23:40.069][ApiProxy          ][Error  ] time="2020-01-14T10:23:40+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:41.076][ApiProxy          ][Error  ] time="2020-01-14T10:23:41+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:42.089][ApiProxy          ][Error  ] time="2020-01-14T10:23:42+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:42.745][ApiProxy          ][Info   ] time="2020-01-14T10:23:42+01:00" msg="DNS failure: www-cache.\tIN\t A: errno 9002: DnsQuery: DNS-Serverfehler."
[10:23:42.748][ApiProxy          ][Info   ] time="2020-01-14T10:23:42+01:00" msg="DNS failure: www-cache.\tIN\t AAAA: errno 9002: DnsQuery: DNS-Serverfehler."
[10:23:43.071][ApiProxy          ][Error  ] time="2020-01-14T10:23:43+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:44.088][ApiProxy          ][Error  ] time="2020-01-14T10:23:44+01:00" msg="Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden"
[10:23:44.758][VpnKit            ][Info   ] vpnkit.exe: Expired 256 UDP NAT rules
</code></pre>

<hr>

<h2>Trouble Shooting:</h2>

<h3>Proxy-Settings</h3>

<p>my machine is behind a proxy so I add the corresponding informations inside the <strong>Proxy</strong> tab</p>

<blockquote>
  <p>No changes</p>
</blockquote>

<h3>Ping kubernetes.docker.internal</h3>

<pre><code>Ping wird ausgeführt für kubernetes.docker.internal [127.0.0.1] mit 32 Bytes Daten:
Antwort von 127.0.0.1: Bytes=32 Zeit&lt;1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit&lt;1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit&lt;1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit&lt;1ms TTL=128
Ping-Statistik für 127.0.0.1:
    Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0
</code></pre>

<h3>Proxy: Ignore Local Address</h3>

<p>Therefore kubernetes.docker.internal is a local address I add the address to the proxy ignoring list in docker and in my machine internetoptions.</p>

<blockquote>
  <p>No changes</p>
</blockquote>

<h3>Install ca.crt from C:\ProgramData\DockerDesktop\pki</h3>

<p>I also try to add the docker <code>.crt</code> to the trusted certificates of my machine</p>

<blockquote>
  <p>No changes</p>
</blockquote>

<h3>Remove PKI and Reset Kubernetes Cluster</h3>

<p>the endless state of starting kubernetes is not rare, so I found a lot suggestions to handle on <a href="https://github.com/docker/for-mac/issues/2990" rel="nofollow noreferrer">github</a>. The most working suggestions are about remove stuff and reseting docker. I try all of them multiple times.</p>

<blockquote>
  <p>No changes</p>
</blockquote>

<h3>Call <code>https://kubernetes.docker.internal:6443/api/v1/nodes</code> in Browser</h3>

<p><a href="https://i.stack.imgur.com/tlLlx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tlLlx.png" alt="enter image description here"></a></p>

<hr>

<pre><code>Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea
 Built:             Wed Nov 13 07:22:37 2019
 OS/Arch:           windows/amd64
 Experimental:      false
</code></pre>

<p>Testing on a Windows 10 Machine.</p>

<hr>

<p>I spread all my shots and no more clue what to do.</p>

Mar Tin
<p>I'm having the same problem and it seems, that the k8s API doesn't want to answer to the TLS Client hello message. I checked the traffic with Wireshark on the <a href="https://i.stack.imgur.com/X9sPq.png" rel="nofollow noreferrer">local interface</a> (this is the one used for kubernetes.docker.internal). The TCP session setup is working properly. </p>

<p>I also checked in the "Show system containers (advanced)" option in the docker for windows settings under the kubernetes tab, but the "docker ps -a" does not show up any container (I'm not sure it should, but the option's name suggest that to me).</p>

<p>I would gladly continue the debugging and see whether the API service is actually running in the HyperV virtual machine that provides docker in Windows, but I'm not able to connect to it through the Hyper-V Manager. Any idea, how to check that and get the logs for the service?</p>
