[root@master Traffic-Management-Basics]# kubectl apply -f tracing/
destinationrule.networking.istio.io/tracing-dr created
gateway.networking.istio.io/tracing-gateway created
virtualservice.networking.istio.io/tracing-virtualservice created
[root@master Traffic-Management-Basics]# cat tracing/tracing-gateway.yaml
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: tracing-gateway
namespace: istio-system
spec:
selector:
app: istio-ingressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "tracing.yang.com"
---
[root@master Traffic-Management-Basics]# cat tracing/tracing-virtualservice.yaml
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: tracing-virtualservice
namespace: istio-system
spec:
hosts:
- "tracing.yang.com"
gateways:
- tracing-gateway
http:
- match:
- uri:
prefix: /
route:
- destination:
host: tracing
port:
number: 80
---
[root@master Traffic-Management-Basics]# cat tracing/tracing-destinationrule.yaml
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: tracing-dr
namespace: istio-system
spec:
host: tracing
trafficPolicy:
tls:
mode: DISABLE
---
![](https://img2022.cnblogs.com/blog/1204490/202211/1204490-20221123141712148-457488993.png)