大家好,我很难使用traefik v2从入口路由到外部域
情况是,如果有对/firebase
的请求,它将把请求转发到
外部域(例如 tes.web.app )(群集外部),并且网址栏中的URL仍位于 example.com/firebase 中。
就像使用 proxy_pass
的nginx路由规则我的期望是这样
传入请求-> example.com/firebase->渲染tes.web.app
传入请求-> example.com/firebase/test->渲染tes.web.app/test
我的设置就是这样
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: api
namespace: minio
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`example.com) && PathPrefix(`/firebase`)
services:
- kind: Service
name: external-minio
namespace: minio
port: 443
---
apiVersion: v1
kind: Service
metadata:
name: external-minio
namespace: minio
spec:
type: ExternalName
externalName: tes.web.app
ports:
- protocol: TCP
port: 443
targetPort: 443
name: https
任何解决方案或对此有何想法?
我正在考虑在集群之外使用另一个nginx / traefik实例来解决此问题。