【发布时间】:2022-04-02 04:00:16
【问题描述】:
如何在 Windows/Windows WSL 之间共享 Minikube 实例?
在 Windows WSL 中 minikube start 失败:
???? minikube v1.22.0 on Ubuntu 20.04
✨ Using the docker driver based on existing profile
???? Starting control plane node minikube in cluster minikube
???? Pulling base image ...
???? Updating the running docker "minikube" container ...
???? StartHost failed, but will try again: provision: Temporary Error: NewSession: new client: new client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
???? Updating the running docker "minikube" container ...
???? Failed to start docker container. Running "minikube delete" may fix it: provision: Temporary Error: NewSession: new client: new client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
❌ Exiting due to IF_SSH_AUTH: Failed to start host: provision: Temporary Error: NewSession: new client: new client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
???? Suggestion: Your host is failing to route packets to the minikube VM. If you have VPN software, try turning it off or configuring it so that it does not re-route traffic to the VM IP. If not, check your VM environment routing options.
???? Documentation: https://minikube.sigs.k8s.io/docs/handbook/vpn_and_proxy/
???? Related issue: https://github.com/kubernetes/minikube/issues/3930
以上工作在Windows:
???? minikube v1.17.1 on Microsoft Windows 10 Pro 10.0.19042 Build 19042
???? minikube 1.22.0 is available! Download it: https://github.com/kubernetes/minikube/releases/tag/v1.22.0
???? To disable this notice, run: 'minikube config set WantUpdateNotification false'
✨ Using the docker driver based on existing profile
???? Starting control plane node minikube in cluster minikube
???? Updating the running docker "minikube" container ...
???? Preparing Kubernetes v1.20.2 on Docker 20.10.2 ...
???? Verifying Kubernetes components...
???? Enabled addons: storage-provisioner, dashboard, default-storageclass
???? Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
问题:
- 为什么它会在 Linux 上失败?注意:我最初在 Windows 上安装了 Minikube。
- 有没有办法共享 Minikube 环境?
其次,我想分享一个 Docker 上下文。 docker context ls:
窗户: 返回:
NAME TYPE DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
default * moby Current DOCKER_HOST based configuration npipe:////./pipe/docker_engine https://127.0.0.1:53873 (default) swarm
desktop-linux moby npipe:////./pipe/dockerDesktopLinuxEngine
Windows WSL(Ubuntu):
docker context ls
NAME TYPE DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
default * moby Current DOCKER_HOST based configuration unix:///var/run/docker.sock https://127.0.0.1:51967 (default) swarm
desktop-linux moby
问题:
- 什么是默认值?
- 什么是 desktop-linux?
- 推荐哪一种来充分利用 WSL 的性能提升?
第三,我想分享一个 Kubernetes 上下文。 kubectl config get-contexts:
窗户:
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
docker-desktop docker-desktop docker-desktop
kubernetes/REDACTED kubernetes REDACTED
* minikube minikube minikube default
Windows WSL(Ubuntu):
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
docker-desktop docker-desktop docker-desktop
* minikube minikube minikube
问题:
- 什么是
docker-desktop? - 我可以安全地删除
docker-desktop吗?
【问题讨论】:
-
你在使用WSL 1 or WSL 2吗?
-
它是 WSL 2....
-
您使用哪个命令在 WSL 上启动 minikube?请查看this article。
标签: docker kubernetes minikube