hyper-v VM上的minikube无法ping Windows 10主机

时间:2020-01-03 22:45:58

标签: networking windows-10 hyper-v minikube

我已经阅读了几篇文章,并尝试了许多不同的配置,但是肯定缺少某些内容。

我正在尝试使用hyperv在Win 10笔记本电脑上设置开发环境。我已经让docker与hyperv在这里工作了一段时间。 Docker VM使用名为DockerNAT的内部虚拟交换机。当我在docker中启动ubuntu容器时,它可以ping通主机,还可以通过VPN ping通外部公共网络主机以及公司网络中的服务器。

但是minikube VM无法对我的主机或VPN中的其他服务器执行ping操作。它能够ping公共互联网站点。我尝试在群集中部署的应用程序之一需要在笔记本电脑上本地存在的系统上调用服务,但似乎无法正常运行。显然,这不是生产配置,但我想使其用于POC / dev目的。

> ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : US-DM4LJM2-10
   Primary Dns Suffix  . . . . . . . : pbi.global.pvt
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : pbi.global.pvt
                                       pb.com
                                       ct.pb.com
                                       pitneybowes.ca
                                       g1.com
                                       pbi.hcs.int
                                       corpdom1.com
                                       ngsfac.corpdom1.com
                                       newgistics.com
                                       psi.psigroupinc.com

Ethernet adapter Ethernet 2:

   Connection-specific DNS Suffix  . : pb.com
   Description . . . . . . . . . . . : Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64
   Physical Address. . . . . . . . . : 00-05-9A-3C-7A-00
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 10.110.0.185(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.248.0
   Default Gateway . . . . . . . . . : 10.110.0.1
   DNS Servers . . . . . . . . . . . : 152.144.94.33
                                       152.144.94.50
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter vEthernet (DockerNAT):

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter
   Physical Address. . . . . . . . . : 00-15-5D-01-25-2A
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 10.0.75.1(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter vEthernet (minikubeExternal):

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2
   Physical Address. . . . . . . . . : E0-9D-31-E6-DB-1F
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 192.168.1.41(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Friday, January 3, 2020 5:29:38 PM
   Lease Expires . . . . . . . . . . : Saturday, January 4, 2020 5:29:38 PM
   Default Gateway . . . . . . . . . : 192.168.1.1
   DHCP Server . . . . . . . . . . . : 192.168.1.1
   DNS Servers . . . . . . . . . . . : 192.168.1.1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Wireless LAN adapter Local Area Connection* 1:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter
   Physical Address. . . . . . . . . : E0-9D-31-E6-DB-20
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Ethernet adapter Bluetooth Network Connection:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Bluetooth Device (Personal Area Network)
   Physical Address. . . . . . . . . : E0-9D-31-E6-DB-23
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

我的Docker VM使用DockerNAT开关,这是一个内部hyper-v开关。 minikubeExternal是在hyper-v中绑定到无线适配器的外部开关。我一直无法将其绑定到我认为可能是我的问题的Cisco AnyConnect VPN连接。

Get-VMNetworkAdapter返回:

Name            IsManagementOs VMName          SwitchName       MacAddress   Status                      IPAddresses
----            -------------- ------          ----------       ----------   ------                      -----------
Network Adapter False          DockerDesktopVM DockerNAT        00155D01252B {Degraded, ProtocolVersion} {}
Network Adapter False          minikube        minikubeExternal 00155D01253A {Ok}                        {192.168.1.43, fe80::215:5dff:fe01:253a}

要测试从minikube群集中查看主机的能力,我发出了minikube ssh命令并尝试ping主机IP。我尝试对主机的IP地址以及minikubeExternal交换机的IP进行ping操作,但均无效(ping只能挂起)。

我也尝试了在没有连接VPN的情况下进行此操作,并且得到了相同的结果。由于DockerNAT是内部的并且能够对主机和公共Internet进行ping操作,因此我尝试将minikube VM交换机也配置为内部交换机,甚至尝试仅使用DockerNAT交换机,而这些都不起作用。

任何建议将不胜感激。

> minikube version
minikube version: v1.6.2
commit: 54f28ac5d3a815d1196cd5d57d707439ee4bb392
> kubectl version
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", Co
mpiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf", GitTreeState:"clean", BuildDate:"2019-12-07T21:12:17Z", GoVersion:"go1.13.4", Co
mpiler:"gc", Platform:"linux/amd64"}

0 个答案:

没有答案