mirror of https://github.com/hashicorp/consul
Add example HTTPRoute referencing the MeshService as backendRef
parent
d1f1ff50f8
commit
e41ec340d8
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue