On this page
Kubernetes services
Route traffic to an HTTP or HTTPS Kubernetes service.
You can route to a Kubernetes service by referencing that service in the backendRefs section of your HTTPRoute resource as shown in the following example.
Most guides in this documentation route traffic to a Kubernetes service directly. If you want to route to external resources, such as a static hostname or AWS resource, create a Backend resource.
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: kube-backend
namespace: default
spec:
parentRefs:
- name: http
namespace: gloo-system
hostnames:
- httpbin.example.com
rules:
- backendRefs:
- name: httpbin
port: 8000
filters:
- type: ExtensionRef
extensionRef:
group: gateway.kgateway.dev
kind: TrafficPolicy
name: rewrite