Error starting host: Error getting state for host: machine does not exist.

If you ran minikube start and got that error, below could be the steps to fix it. I assume you have already installed minikube (v0.19.1), kubectl (v1.6.4), and virtualbox (v5.1.22). If not:

curl -Lo minikube && chmod +x minikube && sudo mv minikube /usr/local/bin/
curl -Lo kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/

Then download and install virtualbox at:

Now, see if you have the minikube dir

ls -l ~/.minikube/machines/

If so, see if there are files inside. Chances are that you have some out-dated files.

ls -l ~/.minikube/machines/minikube/

Remove them. Don’t worry, we will download the files back.

rm -rf ~/.minikube/machines/minikube/

And remove the existing minikube vm at virtualbox if you have one.

Search for minikube- at As of June 2017 the latest version is minikube-v0.19.0.iso, just look for the latest one.

Then ask yourself how much space you want to allocate to the minikube virtual machine. If you don’t specify, it will be 20Gb by default. Let’s say we want to use 2Gb only (which is the minimum requirement).

Issue this to start minikube.

minikube start --disk-size 2g --vm-driver=virtualbox --iso-url=""

Starting local Kubernetes v1.6.4 cluster...
Starting VM...
Moving files into cluster...
Setting up certs...
Starting cluster components...
Connecting to cluster...
Setting up kubeconfig...
Kubectl is now configured to use the cluster.

If anything fails, add the –v=9 flag, that will give you lots of debugging info.

To double check, do cat ~/.kube/config, you should have something similar to the following.

apiVersion: v1
- cluster:
    certificate-authority: /Users/brian/.minikube/ca.crt
  name: minikube
- context:
    cluster: minikube
    user: minikube
  name: minikube
current-context: minikube
kind: Config
preferences: {}
- name: minikube
    client-certificate: /Users/brian/.minikube/apiserver.crt
    client-key: /Users/brian/.minikube/apiserver.key

Then deploy echoserver. It should have no errors.

kubectl run hello-minikube --port=8080


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s