Add example HTTPRoute referencing the MeshService as backendRef

pull/15015/head
Nathan Coleman 2022-10-17 16:25:46 -04:00
parent d1f1ff50f8
commit e41ec340d8
1 changed files with 22 additions and 0 deletions

View File

@ -37,3 +37,25 @@ spec:
peer: dc2
```
</CodeBlockConfig>
A `HTTPRoute` may then reference this `example-mesh-service` as its `backendRef`.
<CodeBlockConfig filename="route.yaml">
```yaml hideClipboard
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: example-route
##...
spec:
...
rules:
- backendRefs:
- group: api-gateway.consul.hashicorp.com
kind: MeshService
name: example-mesh-service
port: 3000
...
```
</CodeBlockConfig>