简体   繁体   English

如何建立VPN隧道连接到kubernetes集群外的eureka

[英]How should be VPN tunneling established to connect to eureka outside kubernetes cluster

I have spring-boot microservices deployed to kubernetes cluster. 我有部署到kubernetes集群的spring-boot微服务。 Outside cluster there is netflix eureka discovery service on AWS. 在集群外部,AWS上有netflix eureka发现服务。 I want to register my services on this eureka. 我想在这个尤里卡上注册我的服务。 Gateway is also on AWS. Gateway也在AWS上。 On my localmachine I need to create vpn connection via openvpn to get access to eureka, Kubernetes cluster is also outside aws and vpn is needed. 在我的localmachine上,我需要通过openvpn创建vpn连接以访问eureka,Kubernetes集群也在aws之外,需要vpn。 I have *.ovpn, I guess that I have to create some vpn tunneling on kubernetes but I don't know the proper tool for that 我有* .ovpn,我想我必须在kubernetes上创建一些vpn隧道,但我不知道适当的工具

In the past I looked for something like openvpn client for kubernetes but I got only openvpn servers 在过去,我寻找像kubernetes的openvpn客户端,但我只有openvpn服务器

I expect that when I set a proper host as Eureka url, my services will register properly over vpn 我希望当我将一个合适的主机设置为Eureka url时,我的服务将在vpn上正确注册

It is possible to put every Kubernetes pod on the OpenVPN network so that they would be able to access the Eureka instance. 可以将每个Kubernetes pod放在OpenVPN网络上,以便他们能够访问Eureka实例。 However, since you want Eureka to do service discovery, it also needs to know the "real" IP of every pod instead of just seeing their VPN IP. 但是,由于您希望Eureka进行服务发现,因此它还需要知道每个pod的“真实”IP,而不仅仅是看到他们的VPN IP。 If Eureka advertises VPN IPs for everything, all traffic will be routed through OpenVPN connection, which introduces extra latency. 如果Eureka为所有内容公布VPN IP,则所有流量将通过OpenVPN连接进行路由,这会引入额外的延迟。 Such a setup is also hard to debug and monitor. 这样的设置也很难调试和监控。

It is a better idea to use the network bridging solution of your cloud provider. 使用云提供商的网络桥接解决方案是一个更好的主意。 If you're on AWS, Site-to-Site VPN should do the trick. 如果您使用的是AWS,则Site-to-Site VPN应该可以解决问题。 Azure also has an offering of the same name. Azure还提供相同名称的产品。 Google has Cloud VPN and also several enterprise options . Google拥有Cloud VPN以及多种企业选项

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM