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.
In my case the system containers were not created, and all I was getting in log was EOF returned from the kubernetes, at the point when the system containers were supposed to be created.
After investigation, there were solutions with .kube and config deletion, pki and similar. I also investigated whether the network setup and company policies, dns and similar would have an impact. All was partially posible but none provided solution.
The only solution that worked was to Uninstall and Install the latest stable Docker Desktop. So, my understanding is that since there are a lot of upgrades on this docker setup over time, some config or part of installation made a confusion and unrecovarable kubernetes setup/first start.
I would start from analyzing logs of Kubernetes system-containers.
On how to do this please refer to this answer on StackOverflow.
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
deleting the pki directory in C:\programdata\DockerDesktop solved the issue for me.
For future reference, one workaround solution to this MAY BE to delete the C:/ProgramData/DockerDesktop/pki folder.