istio
1# Copyright 2018 Istio Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15apiVersion: networking.istio.io/v1alpha3
16kind: Gateway
17metadata:
18name: tcp-echo-gateway
19spec:
20selector:
21istio: ingressgateway
22servers:
23- port:
24number: 31400
25name: tcp
26protocol: TCP
27hosts:
28- "*"
29---
30apiVersion: networking.istio.io/v1alpha3
31kind: DestinationRule
32metadata:
33name: tcp-echo-destination
34spec:
35host: tcp-echo
36subsets:
37- name: v1
38labels:
39version: v1
40- name: v2
41labels:
42version: v2
43---
44apiVersion: networking.istio.io/v1alpha3
45kind: VirtualService
46metadata:
47name: tcp-echo
48spec:
49hosts:
50- "*"
51gateways:
52- tcp-echo-gateway
53tcp:
54- match:
55- port: 31400
56route:
57- destination:
58host: tcp-echo
59port:
60number: 9000
61subset: v1
62