gpt4 book ai didi

Kubernetes 入口规则 : How to use wildcard and specific subdomain together

转载 作者:行者123 更新时间:2023-12-04 19:27:12 25 4
gpt4 key购买 nike

我希望 Ingress 将特定子域重定向到一个后端,并将所有其他域重定向到另一个后端。基本上,我想定义如下规则:

If subdomain is foo.bar.com then go to s1, for all other subdomains go to s2



当我在 Ingress 规范中定义如下所示的规则时,我在部署时遇到此异常:
Error: UPGRADE FAILED: cannot re-use a name that is still in use

当我改变 *.bar.comdemo.bar.com但是,它有效。

这是我的 Ingress 资源规范:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test
spec:
rules:
- host: foo.bar.com
http:
paths:
- backend:
serviceName: s1
servicePort: 80
- host: *.bar.com
http:
paths:
- backend:
serviceName: s2
servicePort: 80

任何人都知道是否可能?

最佳答案

在查看问题 41881 时,我很确定目前这是不可能的。 ,但我可能在最新版本的 Kubernetes 中遗漏了一些东西——我们即将 release 1.12正如我们所说。

关于Kubernetes 入口规则 : How to use wildcard and specific subdomain together,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52328483/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com