istio-gateway-virtualService
作者:互联网
部署istio的ingressGateway时,
把istio的IngressGateway理解为 k8s的ingressController
把Gateway理解为 k8s的ingress规则
将k8s的Service通过VirtualService映射到Gateway
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: test-gateway
namespace: test
spec:
selector:
istio: ingressgateway # use istio default controller
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:- "*"
通过 DestinationRule 来定义不同版本,在istio称为 子集subsets。
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: test-destinationrule
namespace: test
spec:
host: test-service
trafficPolicy:
tls:
mode: ISTIO_MUTUAL
subsets:
- name: v1
labels:
version: v1 - name: v2
labels:
version: v2
标签:virtualService,name,subsets,istio,Gateway,test,k8s,gateway 来源: https://www.cnblogs.com/tian-jun-cs/p/14750782.html