I tried to install kubernetes with Docker desktop. However, as soon as I type in
kubectl get nodes
I get Remote kubernetes server unreachable error.
I0217 23:42:56.224000 26220 versioner.go:56] Remote kubernetes server unreachable
Unable to connect to the server: dial tcp 172.28.112.98:6443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Any ideas on how to fix this?
CodePudding user response:
Have you got more than one context in your kubeconfig?
You can check this with kubectl config get-contexts
.
If necessary change your context to Docker Desktop Kubernetes using kubectl config use-context docker-desktop
.
Is it possible that you may have tried minikube and this has left cluster/context in your .kube\config
?