网格外部服务"/>
istio访问网格外部服务
概述
设想一个这样的场景需求:cluster1集群处在网格mesh1管理下,default命名空间下部署有应用sleep, cluster2处在另一网格mesh2下,它的default命名空间下部署有helloworld应用。现sleep应用希望能以域名test.external.helloworld
的形式访问cluster2中的helloworld。这不属于istio的四种多集群部署模型之一,服务之间的调用需要另做配置。
配置
版本备注
kubernetes 1.23.3
istio 1.12
-
暴露cluster2中的helloworld服务
# 为helloworld创建gateway,virtualservice apiVersion: networking.istio.io/v1beta1 kind: Gateway metadata:name: helloworld-gatewaynamespace: default spec:selector:istio: ingressgatewayservers:- hosts:- 'test.external.helloworld'port:name: hahanumber: 15443 protocol: HTTP
更多推荐
istio访问网格外部服务
发布评论