Backends
Use a Backend resource to define a backing destination that you want kgateway to route to. A Backend destination is external to the cluster and, as such, cannot be represented as a Kubernetes Service. For more information, see the Backend API docs.
Types
Check out the following guides for examples on how to use the supported Backends types with kgateway.
Routing
You can route to a Backend by simply referencing that Backend in the backendRefs
section of your HTTPRoute resource as shown in the following example. Note that if your Backend and HTTPRoute resources exist in different namespaces, you must create a Kubernetes ReferenceGrant resource to allow the HTTPRoute to access the Backend.
⚠️
Do not specify a port in the
spec.backendRefs.port
field when referencing your Backend. The port is defined in your Backend resource and ignored if set on the HTTPRoute resource.
backend-httproute.yaml
|
|
For an example, see the Static Backend guide.