【发布时间】:2019-05-12 23:40:38
【问题描述】:
我在 Azure AKS 中有一个带有 1 个节点的集群。
在那个集群上,我有两个后端服务。
每个后端服务都是一个网络应用。
我有一个域 mydomain.com。
每个应用都需要在入口对象中配置自己的路径规则。
Web 应用程序 1s(我们称其为主页应用程序)目标 URL 需要是以下任一:
US version of the site: mydomain.com
Swedish version of the site: mydomain.com/se/sv-sv/hem
Any other location/language version of the site: mydomain.com/xx/yy-xx/abcdefgh
Web 应用程序 2s(我们称之为 whitepony 应用程序)目标 URL 需要是以下任一:
US version of the site: mydomain.com/us/en-us/whitepony
Swedish version of the site: mydomain.com/se/sv-sv/whitepony
Any other location/language version of the site: mydomain.com/xx/yy-xx/whitepony
(无论位置/语言如何,whitepony 应用程序的目标路径段都称为 whitepony)
现在我的问题。
如何在入口 API 对象中配置这些规则?
我可以在路径规则中使用前缀吗?
或者我需要使用正则表达式吗?
对于美国版主页应用程序的特殊情况,我没有使用任何前缀/额外的 URL 段怎么办?
我可以在入口对象中使用条件吗?
或者您将如何配置入口资源对象以满足上述所有要求?
请注意,我知道并且已经使用入口对象中的路径规则成功配置了多个后端服务。
但没有前缀或额外的 URL 段。
【问题讨论】:
标签: kubernetes kubernetes-ingress azure-aks nginx-ingress