如何为运行Cross Kubernete群集的应用程序部署一个入口点?

发布于 2025-01-30 12:24:19 字数 413 浏览 4 评论 0原文

我有两个K8S群集设置,一个在AWS EKS上,另一个在GCP上。我设置了一个用于管理这两个群集的牧场服务器。我有一个应用程序(appa),该应用程序包装在掌舵图中。该应用程序只是由nodejs + Express创建的REST API服务器。

它通过牧场主部署到两个群集。部署后,appa分别在两个群集中运行。

我有另一个应用程序(appb)(在K8之外运行),该应用程序在数据库流上侦听,需要调用appa(在K8S群集中)以处理更改事件。

我的问题是我如何部署输入点,例如Nginx,它将将appb的请求转发到appa,群集中的一个POD应该服务于此请求。

I have two K8S clusters setup, one on AWS EKS, the other is on GCP. I setup a rancher server which is used to manage this two clusters. I have an application (appA) which is packaged in a helm chart. The application is just a rest api server created by nodejs + express.

It is deployed to both clusters via Rancher. After deploy, appA are running in the two clusters separately.

I have another application (appB) (running outside of K8S) which is listening on a database stream and it needs to call appA (in the K8S clusters) to process the change events.

My question is how I can deploy an entry point, like nginx, which will forward the appB's requests to appA, one of the pod from the clusters should serve this request.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

万劫不复 2025-02-06 12:24:19
  • 您可以将Appa Kubernetes服务类型视为LoadBalancer。
  • 您可以在K8之外运行nginx,创建一个上游并添加两个EK
    和GKE LoadBalancers URL作为后端服务器。

请点击以下链接

.com/nginx/admin-guide/load-balancer/http-load-balancer/

  • You can expose the appA Kubernetes service type as Loadbalancer.
  • You can run nginx outside of the k8s, create a upstream and add both EKS
    and GKE loadbalancers urls as backend servers.

Follow the below link

https://docs.nginx.com/nginx/admin-guide/load-balancer/http-load-balancer/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文