Search code examples
kuberneteskubectlminikube

minikube detecting old version when kubectl is up to date


I am installing minikube again on my Windows machine (did before a couple years ago but hadn't used in over a year) and the installation of the most recent kubectl and minikube went well. That is up until I tried to start minikube with:

minikube start --vm-driver=virtualbox

Which gives the error:

C:\>minikube start --vm-driver=virtualbox
* minikube v1.6.2 on Microsoft Windows 10 Pro 10.0.18362 Build 18362
* Selecting 'virtualbox' driver from user configuration (alternates: [])
! Specified Kubernetes version 1.10.0 is less than the oldest supported version: v1.11.10
X Sorry, Kubernetes 1.10.0 is not supported by this release of minikube

Which doesn't make sense since my kubectl version --client gives back the version of v1.17.0:

C:\>kubectl version --client

Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf", GitTreeState:"clean", BuildDate:"2019-12-07T21:20:10Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"windows/amd64"}

I did find that for some reason when I have the kubectl.exe that was downloaded to the correct kubectl folder in my program files(x86) (which the environment variable I had already was pointing to) it would say the version is v1.14.3. But then I copied the same file from that folder and just pasted it into the C Drive at its root and then it says the version is v1.17.0.

I am assuming that is just because it being at root is the same as adding it to the environment variables, but then that means something has an old v1.14.3 kubectl file, but there aren't any other kubectl files in there.

So basically, I am not sure if there is something that needs to be set in minikube (which from the documentation I haven't seen a reference to) but somehow minikube is detecting an old kubectl that I need to get rid of.


Solution

  • Since you already had the minikube installed before and update the installation, the best thing to do is execute minikube delete to clean up all previous configuration.

    The minikube delete command can be used to delete your cluster. This command shuts down and deletes the Minikube Virtual Machine. No data or state is preserved.

    After that execute minikube start --vm-driver=virtualbox and wait the cluster up.

    EDIT:

    As mentioned in the the comments, if the command above didn't help, try to use the --purge --all flag to remove the .minikube folder and all profiles.

    Reference: https://minikube.sigs.k8s.io/docs/commands/delete/

    Troubleshoot page: https://minikube.sigs.k8s.io/docs/handbook/troubleshooting/