Skip to content

Instantly share code, notes, and snippets.

@zioproto
Last active April 14, 2023 05:54
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 zioproto/51942b8bf79efa96a2a90b722fb61a54 to your computer and use it in GitHub Desktop.
Save zioproto/51942b8bf79efa96a2a90b722fb61a54 to your computer and use it in GitHub Desktop.
Istio Bookinfo Gateway that works on Microsoft Azure
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: Gateway
metadata:
name: bookinfo-gateway
namespace: istio-system
annotations:
service.beta.kubernetes.io/azure-load-balancer-health-probe-request-path: /productpage
# TODO test:
# service.beta.kubernetes.io/azure-load-balancer-health-probe-request-path: /healthz/ready
# service.beta.kubernetes.io/port_80_health-probe_protocol: http
# service.beta.kubernetes.io/port_80_health-probe_port: 15021
spec:
gatewayClassName: istio
listeners:
- name: http
port: 80
protocol: HTTP
allowedRoutes:
namespaces:
from: All
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: bookinfo
namespace: bookinfo # Assumes you are installing in namespace bookinfo: kubectl apply -n bookinfo -f samples/bookinfo/platform/kube/bookinfo.yaml
spec:
parentRefs:
- name: bookinfo-gateway
namespace: istio-system
rules:
- matches:
- path:
type: Exact
value: /productpage
- path:
type: PathPrefix
value: /static
- path:
type: Exact
value: /login
- path:
type: Exact
value: /logout
- path:
type: PathPrefix
value: /api/v1/products
backendRefs:
- name: productpage
port: 9080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment