istio访问网格外部服务

编程入门 行业动态 更新时间:2024-10-11 21:21:28

istio访问<a href=https://www.elefans.com/category/jswz/34/1770341.html style=网格外部服务"/>

istio访问网格外部服务

概述

设想一个这样的场景需求:cluster1集群处在网格mesh1管理下,default命名空间下部署有应用sleep, cluster2处在另一网格mesh2下,它的default命名空间下部署有helloworld应用。现sleep应用希望能以域名test.external.helloworld的形式访问cluster2中的helloworld。这不属于istio的四种多集群部署模型之一,服务之间的调用需要另做配置。

配置

版本备注

kubernetes 1.23.3
istio 1.12

  1. 暴露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访问网格外部服务

本文发布于:2024-02-14 00:00:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1760662.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:网格   istio

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!