“电线"是指Kubernetes中一项服务的多个部署 [英] "Wire" multiple Deployments to one Service in Kubernetes

查看:90
本文介绍了“电线"是指Kubernetes中一项服务的多个部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几种不同的部署方式.
Deployment A: export port 3333
Deployment B: export port 4444
我想使用一个Service(具有LoadBalancer类型)来导出它们.
Service Main: export port 4545 -> Route to Deployment A's port 3333 export port 5555 -> Route to Deployment B's port 4444

I have several different Deployments.
Deployment A: export port 3333
Deployment B: export port 4444
I want to use a single Service(with LoadBalancer type) to export them.
Service Main: export port 4545 -> Route to Deployment A's port 3333 export port 5555 -> Route to Deployment B's port 4444

该文档说您可以在一个服务上导出多个端口,但没有说明它是否适用于多个部署.
由于Services使用selector选择部署,但就我而言,选择结果将有多个部署.

The documentation say that you can export multiple ports on one services, but it doesn't say whether it works for multiple Deployments.
Since Services use selector to select Deployments but in my case, there will be more than one Deployment comes from the selecting result.

推荐答案

我认为今天不可能做到这一点,但它似乎是一个潜在有用的功能.我提出了功能请求.

I don't think that is possible today, but it seems like a potentially useful feature. I filed a feature request.

这篇关于“电线"是指Kubernetes中一项服务的多个部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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