无法 运行 Kubernetes (kubectl) 和 Minikube on windows 10. 无法连接到服务器:拨打 tcp [::1]:8080: connectex:

Unable to run Kubernetes (kubectl) and Minikube on windows 10. Unable to connect to the server: dial tcp [::1]:8080: connectex:

这是完整的错误 Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

这是我的 Kubectl 配置视图

apiVersion: v1
clusters: []
contexts:
- context:
    cluster: ""
    user: ""
  name: dev
current-context: dev
kind: Config
preferences: {}
users: []

我是 运行 Minikube start。它卡在 Starting VM...

在 Hyper-V 管理器中,我有 minikube VM 运行。

查看“Minikube on Windows 10 with Hyper-V" by Jock Reed

以管理员身份从 Windows CMD 控制台发送到 运行 的命令是:

minikube start --vm-driver hyperv --hyperv-virtual-switch "Primary Virtual Switch"

Primary Virtual Switch”是您首先创建的新 "External" "Virtual network switch" 的名称。

不要忘记为 minikube 虚拟机关闭动态内存 (minikube issue 2326)

还有可能,disable IPv6 on Network Adapter Windows 10 (issue 754

确保使用 v0.28.0/minikube-windows-amd64 executable, as mentioned in issue 1943.