Windows和HyperV上的Minikube:卡在提示"minikube登录"上 [英] Minikube on Windows and HyperV: Stuck on prompt "minikube login"

查看:724
本文介绍了Windows和HyperV上的Minikube:卡在提示"minikube登录"上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Kubernetes的新手",我想在运行Hyper-V和Windows 10的本地计算机上进行尝试.我看到minikube用于本地开发,并且能够在Chocolatey上找到它,所以我使用了它来安装它:

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

(我认为这也会安装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

我在HyperV中配置了一个外部开关(我在某处找到它作为建议),但是当我运行命令时,它被卡在Creating VM ...

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 ...

我认为,如果我查看在HyperV中创建的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:

因此,似乎它正在等待输入,这就是为什么它卡住了!我尝试搜索问题,但无济于事.

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.

我将不胜感激

PS:在我看来,如果我等待足够长的时间,控制台上会显示以下消息:

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

推荐答案

因此,我偶然发现了解决问题的方法.

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

第一件事是:VM正在显示提示(minikube login)的事实似乎很正常,并且不会阻止minikube start成功.

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:

  • 删除~/.kube目录
  • 删除~/.minikube目录(如果存在)
  • 最重要的步骤:停止/启动 Hyper-V虚拟机管理 Windows服务
  • 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:我使用此命令启动minikube并启用详细日志记录:

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

minikube start --vm-driver hyperv -v 7 --alsologtostderr

这篇关于Windows和HyperV上的Minikube:卡在提示"minikube登录"上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆