Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minikube on Windows and HyperV: Stuck on prompt "minikube login"

I'm "extremely" new to Kubernetes, and I wanted to try it out on my local machine, which is running Windows 10 along with HyperV. I saw that minikube is used for local development, and I was able to find in on Chocolatey, so I installed it using that:

choco install minikube -y

(I think this also installs kubectl)

The problem I have is that I'm not able to start it; I'm running the following command:

minikube start --vm-driver=hyperv

I have an external switch configured in HyperV (I found it as a suggestion somewhere), but when I run the command, it's stuck in Creating VM ...

I thought maybe it would give me a clue if I look at the VM created in HyperV, and when I open that, I see the following: enter image description here

So, it seems that it's waiting for input, and that's why it's stuck! I tried searching for the problem, but to no avail.

I would appreciate any help

PS: It seems to me that if I wait long enough, the following message appears on the console:

Temporary Error: provisioning: error getting ssh client: Error dialing
    tcp via ssh client: ssh: handshake failed: ssh: unable to authenticate, 
    attempted methods [none publickey], no supported methods remain
like image 902
Farzad Avatar asked Oct 03 '18 18:10

Farzad


People also ask

What is the default username and password for Minikube?

Testing Environment Information: Windows 10 Enterprise: Version 1909 (OS Build 18396.535) (Type winver or systeminfo at a Command Prompt) Minikube (latest release as of 12/20/2019) https://minikube.sigs.k8s.io/docs/start/windows/ Testing Date: 1/02/2020 Username and Password: The default login is, username: “docker”, ...

Does Minikube require Hyper-V?

Minikube depends on a container or a virtual machine manager to deploy a Kubernetes cluster. Some of the virtual machine managers it supports are Docker, Hyper kit, Hyper-V, KVM, Parallels, Podman, VirtualBox, and VMWare. Since we are using a Windows environment, we can simply use the inbuilt Hyper-V virtualization.

How long does Minikube take to start?

If you have all the components in place, setting up Minikube shouldn't take you more than five minutes. If you're starting from scratch, expect it to take a few hours. Once the VM is installed, install the Kubernetes command-line tool, kubectl. Without it, you can't work with Minikube.


1 Answers

So, somehow by chance, I think I found how to resolve the issue.

First thing is that: the fact the VM is displaying that prompt (minikube login) seems to be normal, and it does NOT prevent the minikube start from succeeding.

To resolve the issue, this is what I did:

  • Delete ~/.kube directory
  • Delete ~/.minikube directory (in case it exists)
  • The MOST IMPORTANT step: stop/start the Hyper-V Virtual Machine Management Windows service

These steps seem to have solved the issue for me

PS: I used this command to start minikube and enable verbose logging:

minikube start --vm-driver hyperv -v 7 --alsologtostderr
like image 143
Farzad Avatar answered Dec 17 '22 08:12

Farzad