for-win icon indicating copy to clipboard operation
for-win copied to clipboard

Kubernetes fails to initialize after Docker Desktop upgrade

Open msbecker opened this issue 7 years ago • 6 comments

  • [ ] I have tried with the latest version of my channel (Stable or Edge)
  • [x ] I have uploaded Diagnostics
  • Diagnostics ID: 41736093-4322-45DE-BDEF-B4EA2D950575/20190612125912

Expected behavior

After upgrade, Docker Desktop should show green dot, "Kubernetes is running"

Actual behavior

Docker Desktop shows yellow dot, stuck at "Kubernetes is starting" after upgrade to 2.0.5.0 (35318) on both Mac High Sierra and Windows 10

Information

  • Windows Version: windows 10 1803
  • Docker Desktop Version: 2.0.5.0

Steps to reproduce the behavior

  1. On the Mac, I did a full reset of Docker Desktop and then re-enabled Kubernetes. This resolved the issue on the Mac.
  2. I did the same on Docker Desktop on the PC, and this did not resolve the issue. Still stuck at "Kubernetes is starting"

msbecker avatar Jun 12 '19 13:06 msbecker

Same thing with me on Windows 10 Pro 1809. I have installed the latest Docker Desktop for Windows (Version: 2.0.5.0 (35318)).

Here is end of my log file

[17:45:45.680][ApiProxy          ][Info   ] time="2019-06-12T17:45:45+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:45.682][ApiProxy          ][Info   ] time="2019-06-12T17:45:45+03:00" msg="proxy << HEAD /_ping (2.0024ms)\n"
[17:45:45.703][ApiProxy          ][Info   ] time="2019-06-12T17:45:45+03:00" msg="proxy >> GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D\n"
[17:45:45.705][ApiProxy          ][Info   ] time="2019-06-12T17:45:45+03:00" msg="proxy << GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D (1.9995ms)\n"
[17:45:46.068][ApiProxy          ][Info   ] time="2019-06-12T17:45:46+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:46.069][ApiProxy          ][Info   ] time="2019-06-12T17:45:46+03:00" msg="proxy << HEAD /_ping (999.4µs)\n"
[17:45:46.089][ApiProxy          ][Info   ] time="2019-06-12T17:45:46+03:00" msg="proxy >> GET /v1.40/containers/json?all=1\n"
[17:45:46.092][ApiProxy          ][Info   ] time="2019-06-12T17:45:46+03:00" msg="proxy << GET /v1.40/containers/json?all=1 (2.9701ms)\n"
[17:45:46.272][ApiProxy          ][Info   ] time="2019-06-12T17:45:46+03:00" msg="0/3 system pods running, found labels  but still waiting for labels k8s-app=kube-dns, component=kube-controller-manager, component=kube-apiserver..."
[17:45:46.720][ApiProxy          ][Info   ] time="2019-06-12T17:45:46+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:46.722][ApiProxy          ][Info   ] time="2019-06-12T17:45:46+03:00" msg="proxy << HEAD /_ping (1.9997ms)\n"
[17:45:46.746][ApiProxy          ][Info   ] time="2019-06-12T17:45:46+03:00" msg="proxy >> GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D\n"
[17:45:46.748][ApiProxy          ][Info   ] time="2019-06-12T17:45:46+03:00" msg="proxy << GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D (2.0126ms)\n"
[17:45:47.103][ApiProxy          ][Info   ] time="2019-06-12T17:45:47+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:47.105][ApiProxy          ][Info   ] time="2019-06-12T17:45:47+03:00" msg="proxy << HEAD /_ping (2.0037ms)\n"
[17:45:47.126][ApiProxy          ][Info   ] time="2019-06-12T17:45:47+03:00" msg="proxy >> GET /v1.40/containers/json?all=1\n"
[17:45:47.129][ApiProxy          ][Info   ] time="2019-06-12T17:45:47+03:00" msg="proxy << GET /v1.40/containers/json?all=1 (2.9987ms)\n"
[17:45:47.282][ApiProxy          ][Info   ] time="2019-06-12T17:45:47+03:00" msg="0/3 system pods running, found labels  but still waiting for labels k8s-app=kube-dns, component=kube-controller-manager, component=kube-apiserver..."
[17:45:47.677][ApiProxy          ][Info   ] time="2019-06-12T17:45:47+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:47.678][ApiProxy          ][Info   ] time="2019-06-12T17:45:47+03:00" msg="proxy << HEAD /_ping (1.0002ms)\n"
[17:45:47.699][ApiProxy          ][Info   ] time="2019-06-12T17:45:47+03:00" msg="proxy >> GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D\n"
[17:45:47.701][ApiProxy          ][Info   ] time="2019-06-12T17:45:47+03:00" msg="proxy << GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D (1.9986ms)\n"
[17:45:48.074][ApiProxy          ][Info   ] time="2019-06-12T17:45:48+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:48.075][ApiProxy          ][Info   ] time="2019-06-12T17:45:48+03:00" msg="proxy << HEAD /_ping (995.4µs)\n"
[17:45:48.097][ApiProxy          ][Info   ] time="2019-06-12T17:45:48+03:00" msg="proxy >> GET /v1.40/containers/json?all=1\n"
[17:45:48.100][ApiProxy          ][Info   ] time="2019-06-12T17:45:48+03:00" msg="proxy << GET /v1.40/containers/json?all=1 (1.9761ms)\n"
[17:45:48.272][ApiProxy          ][Info   ] time="2019-06-12T17:45:48+03:00" msg="0/3 system pods running, found labels  but still waiting for labels k8s-app=kube-dns, component=kube-controller-manager, component=kube-apiserver..."
[17:45:48.682][ApiProxy          ][Info   ] time="2019-06-12T17:45:48+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:48.683][ApiProxy          ][Info   ] time="2019-06-12T17:45:48+03:00" msg="proxy << HEAD /_ping (998.8µs)\n"
[17:45:48.704][ApiProxy          ][Info   ] time="2019-06-12T17:45:48+03:00" msg="proxy >> GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D\n"
[17:45:48.706][ApiProxy          ][Info   ] time="2019-06-12T17:45:48+03:00" msg="proxy << GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D (2.002ms)\n"
[17:45:49.067][ApiProxy          ][Info   ] time="2019-06-12T17:45:49+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:49.068][ApiProxy          ][Info   ] time="2019-06-12T17:45:49+03:00" msg="proxy << HEAD /_ping (1.0021ms)\n"
[17:45:49.093][ApiProxy          ][Info   ] time="2019-06-12T17:45:49+03:00" msg="proxy >> GET /v1.40/containers/json?all=1\n"
[17:45:49.096][ApiProxy          ][Info   ] time="2019-06-12T17:45:49+03:00" msg="proxy << GET /v1.40/containers/json?all=1 (3.0008ms)\n"
[17:45:49.274][ApiProxy          ][Info   ] time="2019-06-12T17:45:49+03:00" msg="0/3 system pods running, found labels  but still waiting for labels k8s-app=kube-dns, component=kube-controller-manager, component=kube-apiserver..."
[17:45:49.681][ApiProxy          ][Info   ] time="2019-06-12T17:45:49+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:49.682][ApiProxy          ][Info   ] time="2019-06-12T17:45:49+03:00" msg="proxy << HEAD /_ping (1.0002ms)\n"
[17:45:49.703][ApiProxy          ][Info   ] time="2019-06-12T17:45:49+03:00" msg="proxy >> GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D\n"
[17:45:49.705][ApiProxy          ][Info   ] time="2019-06-12T17:45:49+03:00" msg="proxy << GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D (1.9723ms)\n"
[17:45:50.070][ApiProxy          ][Info   ] time="2019-06-12T17:45:50+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:50.071][ApiProxy          ][Info   ] time="2019-06-12T17:45:50+03:00" msg="proxy << HEAD /_ping (964.7µs)\n"
[17:45:50.092][ApiProxy          ][Info   ] time="2019-06-12T17:45:50+03:00" msg="proxy >> GET /v1.40/containers/json?all=1\n"
[17:45:50.095][ApiProxy          ][Info   ] time="2019-06-12T17:45:50+03:00" msg="proxy << GET /v1.40/containers/json?all=1 (2.9716ms)\n"
[17:45:50.281][ApiProxy          ][Info   ] time="2019-06-12T17:45:50+03:00" msg="0/3 system pods running, found labels  but still waiting for labels k8s-app=kube-dns, component=kube-controller-manager, component=kube-apiserver..."
[17:45:50.679][ApiProxy          ][Info   ] time="2019-06-12T17:45:50+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:50.680][ApiProxy          ][Info   ] time="2019-06-12T17:45:50+03:00" msg="proxy << HEAD /_ping (1.0006ms)\n"
[17:45:50.701][ApiProxy          ][Info   ] time="2019-06-12T17:45:50+03:00" msg="proxy >> GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D\n"
[17:45:50.704][ApiProxy          ][Info   ] time="2019-06-12T17:45:50+03:00" msg="proxy << GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D (2.9994ms)\n"
[17:45:51.072][ApiProxy          ][Info   ] time="2019-06-12T17:45:51+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:51.073][ApiProxy          ][Info   ] time="2019-06-12T17:45:51+03:00" msg="proxy << HEAD /_ping (975.7µs)\n"
[17:45:51.095][ApiProxy          ][Info   ] time="2019-06-12T17:45:51+03:00" msg="proxy >> GET /v1.40/containers/json?all=1\n"
[17:45:51.097][ApiProxy          ][Info   ] time="2019-06-12T17:45:51+03:00" msg="proxy << GET /v1.40/containers/json?all=1 (2.0014ms)\n"
[17:45:51.271][ApiProxy          ][Info   ] time="2019-06-12T17:45:51+03:00" msg="0/3 system pods running, found labels  but still waiting for labels k8s-app=kube-dns, component=kube-controller-manager, component=kube-apiserver..."
[17:45:51.688][ApiProxy          ][Info   ] time="2019-06-12T17:45:51+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:51.689][ApiProxy          ][Info   ] time="2019-06-12T17:45:51+03:00" msg="proxy << HEAD /_ping (975.2µs)\n"
[17:45:51.712][ApiProxy          ][Info   ] time="2019-06-12T17:45:51+03:00" msg="proxy >> GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D\n"
[17:45:51.713][ApiProxy          ][Info   ] time="2019-06-12T17:45:51+03:00" msg="proxy << GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D (2.0005ms)\n"
[17:45:52.070][ApiProxy          ][Info   ] time="2019-06-12T17:45:52+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:52.071][ApiProxy          ][Info   ] time="2019-06-12T17:45:52+03:00" msg="proxy << HEAD /_ping (1.973ms)\n"
[17:45:52.092][ApiProxy          ][Info   ] time="2019-06-12T17:45:52+03:00" msg="proxy >> GET /v1.40/containers/json?all=1\n"
[17:45:52.095][ApiProxy          ][Info   ] time="2019-06-12T17:45:52+03:00" msg="proxy << GET /v1.40/containers/json?all=1 (3.0001ms)\n"
[17:45:52.272][ApiProxy          ][Info   ] time="2019-06-12T17:45:52+03:00" msg="0/3 system pods running, found labels  but still waiting for labels k8s-app=kube-dns, component=kube-controller-manager, component=kube-apiserver..."
[17:45:52.683][ApiProxy          ][Info   ] time="2019-06-12T17:45:52+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:52.684][ApiProxy          ][Info   ] time="2019-06-12T17:45:52+03:00" msg="proxy << HEAD /_ping (965.6µs)\n"
[17:45:52.704][ApiProxy          ][Info   ] time="2019-06-12T17:45:52+03:00" msg="proxy >> GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D\n"
[17:45:52.706][ApiProxy          ][Info   ] time="2019-06-12T17:45:52+03:00" msg="proxy << GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D (1.982ms)\n"
[17:45:53.082][ApiProxy          ][Info   ] time="2019-06-12T17:45:53+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:53.083][ApiProxy          ][Info   ] time="2019-06-12T17:45:53+03:00" msg="proxy << HEAD /_ping (1.0002ms)\n"
[17:45:53.106][ApiProxy          ][Info   ] time="2019-06-12T17:45:53+03:00" msg="proxy >> GET /v1.40/containers/json?all=1\n"
[17:45:53.108][ApiProxy          ][Info   ] time="2019-06-12T17:45:53+03:00" msg="proxy << GET /v1.40/containers/json?all=1 (2.9989ms)\n"
[17:45:53.296][ApiProxy          ][Info   ] time="2019-06-12T17:45:53+03:00" msg="0/3 system pods running, found labels  but still waiting for labels k8s-app=kube-dns, component=kube-controller-manager, component=kube-apiserver..."
[17:45:53.682][ApiProxy          ][Info   ] time="2019-06-12T17:45:53+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:53.684][ApiProxy          ][Info   ] time="2019-06-12T17:45:53+03:00" msg="proxy << HEAD /_ping (1.9778ms)\n"
[17:45:53.704][ApiProxy          ][Info   ] time="2019-06-12T17:45:53+03:00" msg="proxy >> GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D\n"
[17:45:53.706][ApiProxy          ][Info   ] time="2019-06-12T17:45:53+03:00" msg="proxy << GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D (2.0049ms)\n"
[17:45:54.073][ApiProxy          ][Info   ] time="2019-06-12T17:45:54+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:54.074][ApiProxy          ][Info   ] time="2019-06-12T17:45:54+03:00" msg="proxy << HEAD /_ping (1.0002ms)\n"
[17:45:54.096][ApiProxy          ][Info   ] time="2019-06-12T17:45:54+03:00" msg="proxy >> GET /v1.40/containers/json?all=1\n"
[17:45:54.098][ApiProxy          ][Info   ] time="2019-06-12T17:45:54+03:00" msg="proxy << GET /v1.40/containers/json?all=1 (2.0041ms)\n"
[17:45:54.274][ApiProxy          ][Info   ] time="2019-06-12T17:45:54+03:00" msg="0/3 system pods running, found labels  but still waiting for labels k8s-app=kube-dns, component=kube-controller-manager, component=kube-apiserver..."
[17:45:54.699][ApiProxy          ][Info   ] time="2019-06-12T17:45:54+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:54.700][ApiProxy          ][Info   ] time="2019-06-12T17:45:54+03:00" msg="proxy << HEAD /_ping (1.0017ms)\n"
[17:45:54.720][ApiProxy          ][Info   ] time="2019-06-12T17:45:54+03:00" msg="proxy >> GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D\n"
[17:45:54.722][ApiProxy          ][Info   ] time="2019-06-12T17:45:54+03:00" msg="proxy << GET /v1.40/images/json?filters=%7B%22dangling%22%3A%7B%22false%22%3Atrue%7D%7D (2.0008ms)\n"
[17:45:55.075][ApiProxy          ][Info   ] time="2019-06-12T17:45:55+03:00" msg="proxy >> HEAD /_ping\n"
[17:45:55.076][ApiProxy          ][Info   ] time="2019-06-12T17:45:55+03:00" msg="proxy << HEAD /_ping (1.0026ms)\n"
[17:45:55.097][ApiProxy          ][Info   ] time="2019-06-12T17:45:55+03:00" msg="proxy >> GET /v1.40/containers/json?all=1\n"
[17:45:55.099][ApiProxy          ][Info   ] time="2019-06-12T17:45:55+03:00" msg="proxy << GET /v1.40/containers/json?all=1 (1.9991ms)\n"
[17:45:55.272][ApiProxy          ][Info   ] time="2019-06-12T17:45:55+03:00" msg="0/3 system pods running, found labels  but still waiting for labels k8s-app=kube-dns, component=kube-controller-manager, component=kube-apiserver..."
[17:45:55.294][VpnKit            ][Info   ] vpnkit.exe: Expired 256 UDP NAT rules

KlausTrikk avatar Jun 12 '19 14:06 KlausTrikk

Hi,

Thanks for your report. The kubelet logs have:

2019-06-12T13:01:51Z kubelet E0612 13:01:51.901760    2338 reflector.go:126] k8s.io/client-go/informers/factory.go:133: Failed to list *v1beta1.CSIDriver: Get https://vm.docker.internal:6443/apis/storage.k8s.io/v1beta1/csidrivers?limit=500&resourceVersion=0: x509: certificate is valid for docker-for-desktop, kubernetes, kubernetes.default, kubernetes.default.svc, kubernetes.default.svc.cluster.local, host.docker.internal, not vm.docker.internal

The root cause is the hostname used to identify the API endpoint changed (it was previously wrong). Unfortunately this means the certificates need to be regenerated which then causes 2 issues:

  1. we don't tell the user or reset the cluster ourselves when this happens. On Mac as you observed you can work around this by manually resetting the cluster
  2. on Windows resetting the cluster does not regenerate the certs. As a workaround try manually deleting C:\ProgramData\DockerDesktop\pki and resetting to defaults.

We're currently investigating these issues. Sorry for the inconvenience!

djs55 avatar Jun 12 '19 16:06 djs55

Hello David. That did the trick. Deleted the pki folder, reset Docker Desktop, re-enabled k8s and everything is green-lit now. Mike

msbecker avatar Jun 12 '19 16:06 msbecker

Great news, closing as we are tracking this one already https://github.com/docker/for-win/issues/3799 which is the same issue.

mikeparker avatar Jun 12 '19 17:06 mikeparker

as #1962 and #3799 --> delete both pki & .kube folder fixed my issue

nghianghesi avatar Aug 22 '19 21:08 nghianghesi

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked

docker-robott avatar Jul 07 '20 03:07 docker-robott