Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

" Kubernetes is starting ....." forever error on windows 10

Tags:

I had a kubernetes single node cluster on my windows 10 machine. Due some errors I had to reinstall the Docker Desktop and since then kubernetes installation has failed while docker installed successfully. All attempts to resolve e.g. deleting the config file in .kube directory and complete reinstallation have failed. See attached pix for details. Installed docker version is Docker version 18.09.2, build 6247962. All search online efforts do not yield a possible solution. I would appreciate pointers to a solution or walk-around.

enter image description here

like image 781
SyCode Avatar asked Mar 26 '19 16:03

SyCode


People also ask

Can I run Kubernetes on Windows 10?

What options do you have for installing Kubernetes on Windows 10? Similar to Docker, Kubernetes has constraints that you need to watch out for. Kubernetes can run Windows and Linux containers. However, you can only run Windows containers on Windows nodes and Linux containers on Linux nodes.

How long does Kubernetes take to start?

It usually take from 6 to 15 minutes to complete the setting depending on the factors including network speed, vpn and machine capabilities. It still has the unforeseeable factors to stop the successful configuration of Kubernetes even though adopting the above-strict steps.

Does Kubernetes work on Windows?

In order to run Windows containers, your Kubernetes cluster must include multiple operating systems. While you can only run the control plane on Linux, you can deploy worker nodes running either Windows or Linux. Windows nodes are supported provided that the operating system is Windows Server 2019.


2 Answers

I stucked in two kinds of error

  1. system pods running, found labels but still waiting for labels...
  2. xxxx: EOF

I finally sovled it by following the advice by the following project, https://github.com/AliyunContainerService/k8s-for-docker-desktop/ Do as it told you, if not work, remove ~/.kube and ~/Library/Group\ Containers/group.com.docker/pki directory, then restart docker desktop and wait like 5 minutes. The Kubernetes status is running eventually.

like image 71
luudis Avatar answered Nov 11 '22 16:11

luudis


I would suggest you to check running Kubernetes components using command: docker ps -a --filter name=k8s as recommended by Nepomucen here.

Then, check the logs for each component using command:docker logs {container id from the previous command}. You might some idea from the logs.

In my case, it was- 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

So, I tried the solution suggested in this link and it worked for me

like image 42
sa3036 Avatar answered Nov 11 '22 17:11

sa3036