Skip to content

Instantly share code, notes, and snippets.

@christian-posta
Last active July 24, 2019 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christian-posta/9227059a9599bc32f17c231920bbbbbd to your computer and use it in GitHub Desktop.
Save christian-posta/9227059a9599bc32f17c231920bbbbbd to your computer and use it in GitHub Desktop.
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: se-httpbin
spec:
hosts:
- httpbin.gcp.external
addresses:
- 35.232.232.38
ports:
- number: 80
name: http-port
protocol: TCP
resolution: STATIC
location: MESH_EXTERNAL
endpoints:
- address: 35.232.232.38
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: gw-egress
spec:
selector:
istio: egressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- httpbin.gcp.external
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: vs-httpbin-egress
spec:
hosts:
- httpbin.gcp.external
gateways:
- gw-egress
- mesh
http:
- match:
- gateways:
- mesh
port: 80
route:
- destination:
host: istio-egressgateway.istio-system.svc.cluster.local
subset: httpbin
port:
number: 80
weight: 100
- match:
- gateways:
- gw-egress
port: 80
route:
- destination:
host: httpbin.gcp.external
port:
number: 80
weight: 100
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: dr-httpbin-egress
spec:
host: istio-egressgateway.istio-system.svc.cluster.local
subsets:
- name: httpbin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment