gateway/gke-gateway-controller/ex4-route-weight-3.yaml (29 lines of code) (raw):

apiVersion: networking.x-k8s.io/v1alpha1 kind: HTTPRoute metadata: name: my-route namespace: default spec: hosts: - hostnames: - foo.com rules: - action: forwardTo: - targetRef: name: foo-svc weight: 0 - targetRef: name: foo-v2-svc weight: 100 - hostnames: - bar.com rules: - matches: - path: /login headers: accept: text/html action: forwardTo: - targetRef: name: bar-svc