sigs.k8s.io/gateway-api@v1.0.0/examples/standard/default-match-http.yaml (about) 1 apiVersion: gateway.networking.k8s.io/v1 2 kind: GatewayClass 3 metadata: 4 name: default-match-example 5 spec: 6 controllerName: acme.io/gateway-controller 7 --- 8 apiVersion: gateway.networking.k8s.io/v1beta1 9 kind: Gateway 10 metadata: 11 name: default-match-gw 12 spec: 13 gatewayClassName: default-match-example 14 listeners: 15 - name: http 16 protocol: HTTP 17 port: 80 18 --- 19 # This HTTPRoute demonstrates patch match defaulting. If no path match is 20 # specified, CRD defaults adds a default PathPrefix match on the path "/". This 21 # matches every HTTP request and ensures that route rules always have at 22 # least one valid match. 23 apiVersion: gateway.networking.k8s.io/v1beta1 24 kind: HTTPRoute 25 metadata: 26 name: default-match-route 27 labels: 28 app: default-match 29 spec: 30 parentRefs: 31 - name: default-match-gw 32 hostnames: 33 - default-match.com 34 rules: 35 - matches: 36 - headers: 37 - type: Exact 38 name: magic 39 value: default-match 40 backendRefs: 41 - group: acme.io 42 kind: CustomBackend 43 name: my-custom-resource 44 port: 8080 45 - matches: 46 - path: 47 type: Exact 48 value: /example/exact 49 backendRefs: 50 - name: my-service-2 51 port: 8080