kubernetes time-out after re-installation on macOS

8/29/2018

I followed the instructions on https://kubernetes.io/docs/tasks/tools/install-kubectl/ on my Mac and installed Kubernetes CLI using brew.

brew install kubernetes-cli

kubectl and Minikube were installed already some time ago, so I was expecting an update. Now kubectl version and kubernetes cluster-info time out.

pa-demo jps$ kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.2", GitCommit:"bb9ffb1654d4a729bb4cec18ff088eacc153c239", GitTreeState:"clean", BuildDate:"2018-08-08T16:31:10Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"darwin/amd64"}
Unable to connect to the server: dial tcp 192.168.99.100:8443: i/o timeout

When I try to install kubernetes-cli again, I get:

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core, homebrew/cask).
==> New Formulae
topgrade
==> Updated Formulae
bison ✔            azure-cli          bwfmetaedit        erlang@20          ghostscript        jfrog-cli-go       ldc                p11-kit            smlnj              youtube-dl
sphinx-doc ✔       babel              crystal            fauna-shell        helmfile           juju               mkvtoolnix         pyside             tarsnap-gui
alexjs             bat                doctl              fortio             influxdb           kore               nginx              re2c               thors-serializer

Warning: kubernetes-cli 1.11.2 is already installed and up-to-date
To reinstall 1.11.2, run `brew reinstall kubernetes-cli`
-- jpsstack
kubernetes

1 Answer

8/29/2018

You may have installed Minikube, but that doesn't necessarily mean it's actively running. You'd need to run minikube start to actually start the cluster on your machine. This also configures your kubeconfig file to point at the cluster it built.

-- Grant David Bachman
Source: StackOverflow