Minikube: Error getting primary cp: could not find master node

Created on 7 Mar 2020  Â·  8Comments  Â·  Source: kubernetes/minikube

I am on this Mac ...

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15.2
BuildVersion:   19C57

I have installed minikube thus ...

$ brew install minikube

Here's the version of minikube installed ...

$ minikube version
minikube version: v1.8.1
commit: cbda04cf6bbe65e987ae52bb393c10099ab62014

I try to start minikube and face issue ...

$ minikube start
😄  minikube v1.8.1 on Darwin 10.15.2
✨  Automatically selected the hyperkit driver. Other choices: virtualbox, docker

💣  Error getting primary cp: could not find master node

😿  minikube is exiting due to an error. If the above message is not useful, open an issue:
👉  https://github.com/kubernetes/minikube/issues/new/choose
cmultinode kinbug prioritimportant-longterm

Most helpful comment

We're also getting this on 18.04.

The environment to reproduce is https://katacoda.com/courses/kubernetes/launch-single-node-cluster

Run:

curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.8.1/minikube-linux-amd64 && chmod +x minikube && sudo cp minikube /usr/local/bin/ && rm minikube
minikube start

Update:

If we remove the minikube directory (created for 1.6) it starts to boot.

rm -rf .minikube/

All 8 comments

We're also getting this on 18.04.

The environment to reproduce is https://katacoda.com/courses/kubernetes/launch-single-node-cluster

Run:

curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.8.1/minikube-linux-amd64 && chmod +x minikube && sudo cp minikube /usr/local/bin/ && rm minikube
minikube start

Update:

If we remove the minikube directory (created for 1.6) it starts to boot.

rm -rf .minikube/

Thanks for the workaround. I have verified that minikube starts fine after flushing the minikube directory (created for minikube 1.6).

Seems to be an issue, when "upgrading" old machines (i.e. profiles) from 1.6 to 1.8 ?

The NodeType was changed from "Master" to "ControlPlane", without an upgrade path:
https://github.com/kubernetes/minikube/commit/0b460e6cb77cc60710f6816bb51cbe48fe039ec9

ping @sharifelgamal

BTW; You would think that the error message would be "could not find control plane node"

yeah this is fixable. I'll add some backwards compatibility and fix the error message.

I have same issue, on Mac, same build. Where would I find this .minikube directory?

it should be in your home directory, usually under /Users/\

Ok so confirming the fix above however be cautious. your .minikube directory contains config for how you run minikube so only delete it if you remember how you set up minikube in the first place. In my case, I had set up minikube using virtual box and deleting the .minikube directory wiped out that setup config so I had to...

brew uninstall minikube
rm -rf ~/.minikube
brew install minikube
brew link minikube
minikube start --vm-driver=virtualbox

Fixed in v1.8.2.

It's worth noting: minikube delete or minikube delete --purge is always preferable to removing files from minikube's directory, as the latter may cause state inconsistencies.

Was this page helpful?
0 / 5 - 0 ratings