Skip to content

Instantly share code, notes, and snippets.

@hbagdi
Created April 20, 2021 17:40
Show Gist options
  • Save hbagdi/b7d7cfde79610133846edf2644530e6c to your computer and use it in GitHub Desktop.
Save hbagdi/b7d7cfde79610133846edf2644530e6c to your computer and use it in GitHub Desktop.
kind: HTTPRoute
apiVersion: networking.x-k8s.io/v1alpha1
metadata:
name: http-app-1
labels:
app: foo
spec:
hostnames:
- "foo.com"
rules:
- matches:
- path:
type: Prefix
value: /bar
filters:
- type: RequestMirror
requestMirror:
serviceName: foo
port: 8080
- type: RequestMirror
requestMirror:
serviceName: foo-11
port: 8080
forwardTo:
- serviceName: my-service1
port: 8080
- matches:
- headers:
type: Exact
values:
magic: foo
path:
type: Prefix
value: /some/thing
forwardTo:
- serviceName: my-service2
port: 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment