kubectl losing connection to minikube

9/27/2018

I am using

*$ minikube version
minikube version: v0.28.2

and

*$ kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.3", GitCommit:"a4529464e4629c21224b3d52edfe0ea91b072862", GitTreeState:"clean", BuildDate:"2018-09-09T18:02:47Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-26T16:44:10Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

I am running a local cluster, while all of the sudden communication between the cluster and kubectl gets lost:

*$ kubectl get pods
No resources found.
Error from server (Timeout): the server was unable to return a response in the time allotted, but may still be processing the request (get pods)

The problem goes away after performing an explicit minikube stop && minikube start

Any ideas how to debug this?

-- pkaramol
kubectl
kubernetes
minikube

2 Answers

9/28/2018

The problem had to do with resources.

Resolved by stopping minikube and then starting it like this:

minikube --memory 8192 --cpus 2 start

This thread was helpful.

-- pkaramol
Source: StackOverflow

9/27/2018

It sounds to be a problem with your kubectl version.

When I have a server version too old, I usually download a kubectl of the same version.

Here the link (linux version):

curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.10.0/bin/linux/amd64/kubectl
-- Nicola Ben
Source: StackOverflow