Hi,
headbanging here how to make like proxy_pass with istio ?
I want to open address mydomain .com/cnn in my browser, address stays the same, doesn’t redirect. In the background it loads everything from https://www.cnn.com. This setup could be useful for kibana or similar scenarios.
Attempt so far:
---
apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
name: cnn-se
namespace: istio-system
spec:
hosts:
- "cnn.com"
ports:
- number: 443
name: https-port
protocol: HTTPS
resolution: DNS
location: MESH_EXTERNAL
---
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: cnn-proxy-dr
namespace: istio-system
spec:
host: cnn.com
trafficPolicy:
loadBalancer:
simple: ROUND_ROBIN
portLevelSettings:
- port:
number: 443
tls:
mode: SIMPLE
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: my-virtualservice
namespace: istio-system
spec:
gateways:
- istio-system/http-gateway
hosts:
- mydomain.com
http:
- name: rule1
headers:
request:
set:
Host: cnn.com
match:
- uri:
exact: "/cnn"
rewrite:
uri: "/"
route:
- destination:
host: cnn.com
port:
number: 443