您的位置:首页 > 财经 > 产业 > 12333网上服务大厅_资料软件_正规的网店培训机构有哪些_百度网址安全检测中心

12333网上服务大厅_资料软件_正规的网店培训机构有哪些_百度网址安全检测中心

2025/2/24 5:08:56 来源:https://blog.csdn.net/LONG_Yi_1994/article/details/142311635  浏览:    关键词:12333网上服务大厅_资料软件_正规的网店培训机构有哪些_百度网址安全检测中心
12333网上服务大厅_资料软件_正规的网店培训机构有哪些_百度网址安全检测中心

假设需要引入一个外部服务,外部服务ip为10.10.102.90,端口为32033.

引入到istio中后,我想通过域名gindemo.test.ch:9090来访问这个服务。

serviceentry yaml内容如下:

apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:name: gindemo-service-entry
spec:addresses:- 10.10.102.90endpoints:- address: 10.10.102.90ports:http: 32033hosts:- gindemo.test.chlocation: MESH_EXTERNALports:- name: http # 注意,这个名字是不能修改的number: 9090protocol: HTTPresolution: STATIC

引入之后,在sidecar中查询clusters,检查istio是否成功发现该服务

访问服务:

结合vs使用:

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:name: gindemo-virtual-service
spec:hosts:- gindemo.test.chgateways:- meshhttp:- match:- port: 80 # 注意,这个端口是不能修改的route:- destination:host: gindemo.test.chport:number: 9090 # serviceentry中定义的port

结合dr使用:

apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:name: random-lb-destination-rule
spec:host: gindemo.test.ch                # 外部服务或内部服务的域名trafficPolicy:loadBalancer:simple: ROUND_ROBIN                   # 配置为随机负载均衡策略connectionPool:http:http1MaxPendingRequests: 100   # HTTP 1.x 最大挂起请求数maxRequestsPerConnection: 10   # 每个连接的最大请求数outlierDetection:consecutiveErrors: 5             # 连续 5 次错误后剔除实例interval: 10s                    # 检测间隔baseEjectionTime: 30s            # 剔除时间maxEjectionPercent: 50           # 最大剔除百分比

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com