Backends
Use a Backend Backends Destination services or endpoints that kgateway routes traffic to (Kubernetes services, AWS lambdas, external hosts). 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.
spec.backendRefs.port field when referencing your Backends. The port is defined in your Backend resource instead. If port is set on the HTTPRoute resource, the status returns a Reason:BackendNotFound message.
|
|
For an example, see the Static Backend guide.