Windows 10单节点Kubernetes基础架构上的docker-desktop社区版上的MetalLB外部负载平衡器 [英] MetalLB external load balancer on docker-desktop community edition on Windows 10 single-node Kubernetes Infrastructure

查看:101
本文介绍了Windows 10单节点Kubernetes基础架构上的docker-desktop社区版上的MetalLB外部负载平衡器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试建立一个metalLB外部负载平衡器,目的是使用可公开浏览的IP地址从集群外部访问Nginx Pod.我已经完成了此处中提供的所有步骤.我已经设法获得用于服务/nginx类型的外部IP:LoadBalancer,但是当我尝试浏览IP地址时,却一无所获,并显示无法访问此站点".

I am trying to set up a metalLB external load balancer with the intention to access an nginx pod from outside the cluster using a publicly browseable IP address. I have folled all the steps provided in here. I have managed to get the External-IP for service/nginx type:LoadBalancer, but when I try to browse the IP address, I get nothing and it says "This site can’t be reached".

我想知道是否甚至允许docker-desktop win10环境在外部使用公共IP地址访问k8s集群资源?

I wonder whether is it even allowed on the docker-desktop win10 environment to access the k8s cluster resources from outside with a public IP address?

推荐答案

Docker Desktop提供的Kuberntes在VM中运行,并且所有网络流量都被NAT到虚拟机.即使您已经在网络上正确配置了所有内容以使用第2层和DHCP,您的工作或家庭路由器甚至都不知道如何访问Docker,这使得所有服务仅在本地主机上可用.

Kuberntes provided by Docker Desktop is running in a VM and all network traffic is being NATed to a virtual machine. Even if you had everything properly configured on your network for using layer 2 and DHCP, your work or home router would not even know how to reach Docker which makes any services only available on the localhost.

要使其正常工作,您可以尝试使用带有VirtualBox驱动程序的minikube并将网络接口设置为桥接,以便将minikube VM作为独立实例对路由器可见,因此arp请求可以到达minikube.

To make it work you coud try using minikube with VirtualBox driver and set network interface to bridge, so that the minikube VM is visible to your router as a standalone instance and therefore arp requests can reach minikube.

这篇关于Windows 10单节点Kubernetes基础架构上的docker-desktop社区版上的MetalLB外部负载平衡器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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