我有两个服务,tea
每个服务coffee
都在自己的命名空间中,我domain.com
想去tea
服务和domain.com/coffee
去coffee
.
由于每个都在一个命名空间中,我不得不制作两个入口,但是当我尝试应用它们时,我得到了错误MAPPING Path '/coffee' already defined in another Ingress rule
。
我的两个入口如下所示:
茶:
kind: Ingress
apiVersion: extensions/v1beta1
spec:
tls:
- hosts:
- domain.com
secretName: tea-tls
rules:
- host: domain.com
http:
paths:
- path: /
backend:
serviceName: tea
servicePort: 80
和咖啡:
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: coffee
namespace: coffee
spec:
tls:
- hosts:
- domain.com
secretName: coffee}-tls
rules:
- host: domain.com
http:
paths:
- path: /coffee
backend:
serviceName: coffee
servicePort: 80
- path: /coffee/*
backend:
serviceName: coffee
servicePort: 80