在istio中,一个命名空间中定义的virtualservice如何使用另一个命名空间中定义的网关。

问题描述 投票:0回答:1

如果一个 virtualservice A 定义为 namespace A 使用 networking.istio.io,它怎么能使用一个 gateway B 在另一个命名空间中定义。namespace B?

谢谢你

kubernetes istio gateway service-virtualization
1个回答
2
投票

如果它与虚拟服务不在同一个命名空间,你必须在虚拟服务中指定。

检查 spec.gateways

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: bookinfo-Mongo
  namespace: bookinfo-namespace
spec:
  gateways:
  - some-config-namespace/my-gateway # can omit the namespace if gateway is in same
                                       namespace as virtual service.

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: my-gateway
  namespace: some-config-namespace

有相关 ISTIO文件 关于这一点。

© www.soinside.com 2019 - 2024. All rights reserved.