Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save fai555/ae3b71b6f82aaac0d8dd3ee7b4fa7049 to your computer and use it in GitHub Desktop.

Select an option

Save fai555/ae3b71b6f82aaac0d8dd3ee7b4fa7049 to your computer and use it in GitHub Desktop.
kubectl apply -f - <<EOF
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: helloworld-gateway
namespace: istio-test
spec:
selector:
istio: ingressgateway # use istio default controller
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: helloworld
namespace: istio-test
spec:
hosts:
- "*"
gateways:
- helloworld-gateway
http:
- match:
- uri:
exact: /
rewrite:
uri: /hello
route:
- destination:
host: helloworld
port:
number: 5000
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment