gateway.yaml 878 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. ---
  2. apiVersion: networking.istio.io/v1alpha3
  3. kind: Gateway
  4. metadata:
  5. name: http-endpoint-gateway
  6. namespace: prd
  7. spec:
  8. selector:
  9. istio: ingressgateway # use istio default controller
  10. servers:
  11. - port:
  12. number: 80
  13. name: http
  14. protocol: HTTP
  15. hosts:
  16. - "*"
  17. ---
  18. apiVersion: networking.istio.io/v1alpha3
  19. kind: VirtualService
  20. metadata:
  21. name: http-endpoint
  22. namespace: prd
  23. spec:
  24. hosts:
  25. - "*"
  26. gateways:
  27. - http-endpoint-gateway
  28. http:
  29. - match:
  30. - uri:
  31. prefix: /test
  32. route:
  33. - destination:
  34. host: http-endpoint
  35. # subset: v1
  36. port:
  37. number: 8080
  38. # - match:
  39. # - headers:
  40. # cookie:
  41. # regex: "^(.*?;)?(user=jason)(;.*)?$"
  42. # - uri:
  43. # prefix: /test
  44. # route:
  45. # - destination:
  46. # host: http-endpoint
  47. # subset: v2
  48. # port:
  49. # number: 8080