Skip to main content
API resource reference for HTTPRoute, one of the Gateway API resources. To create or change one, see Changing resources; to inspect, see Reading resources.
HTTPRoute is a stable (v1) resource that follows the Gateway API HTTPRoute specification for service traffic routing.

Identity

Groupgateway.networking.k8s.io
Versionv1
KindHTTPRoute
ScopeProject

Overview

An HTTPRoute defines how incoming HTTP requests are routed to backends. It attaches to one or more Gateways (via parentRefs) and describes, through a list of rules, how to match requests — by hostname, path, header, method, or query parameter — and where to forward the ones that match. Each rule can also apply filters to modify requests along the way. Use an HTTPRoute to expose an application through a Datum Cloud Gateway: for example, to send api.example.com/v1 traffic to one backend and everything else to another, or to split traffic across backends by weight.

Spec fields

FieldTypeRequiredDescription
spec.hostnames[]stringNoHostnames matched against the HTTP Host header to select this route. Supports a leading wildcard label (e.g. *.example.com). IP addresses are not allowed.
spec.parentRefs[]ObjectNoReferences to the resources (usually Gateways) this route attaches to. The referenced parent must allow the attachment.
spec.parentRefs[].namestringYesName of the referenced parent resource (e.g. the Gateway).
spec.parentRefs[].groupstringNoAPI group of the parent resource. Defaults to the Gateway API group.
spec.parentRefs[].kindstringNoKind of the parent resource (e.g. Gateway).
spec.parentRefs[].namespacestringNoScope of the parent resource, when it lives outside this route’s own scope.
spec.parentRefs[].sectionNamestringNoName of a specific section (e.g. a Gateway listener) within the parent to attach to.
spec.parentRefs[].portintegerNoNetwork port of the parent resource this route targets.
spec.rules[]ObjectNoA list of matchers, filters, and actions. Each rule matches requests and forwards them to backends.
spec.rules[].matches[]ObjectNoConditions that select requests for this rule. A match can specify path, headers, queryParams, and method.
spec.rules[].backendRefs[]ObjectNoThe backend(s) matching requests are sent to. Each entry sets a name (required) plus optional group, kind, namespace, port, and weight.
spec.rules[].filters[]ObjectNoProcessing steps (e.g. header modification, redirects) applied to requests matching this rule.
spec.rules[].timeoutsObjectNoTimeouts applied to requests matching this rule.

Status fields (read-only)

FieldTypeDescription
status.parents[]ObjectThe parent resources (usually Gateways) this route is associated with, and the route’s status for each. Up to 32 parents are represented; an empty list means the route is not attached to any Gateway.
status.parents[].parentRefObjectReference to the specific parent this status entry describes.
status.parents[].controllerNamestringName of the controller that wrote this status entry.
status.parents[].conditions[]ObjectConditions such as Accepted and ResolvedRefs describing attachment readiness for this parent.

Usage

apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: example-route
spec:
  parentRefs:
    - name: example-gateway
  hostnames:
    - api.example.com
  rules:
    - matches:
        - path:
            type: PathPrefix
            value: /v1
      backendRefs:
        - name: example-backend
          port: 8080
datumctl apply -f httproute.yaml --project my-project
datumctl get httproutes --project my-project
datumctl describe httproute example-route --project my-project
Run datumctl explain httproutes --recursive to see the full, live field tree for this resource.
Last modified on July 2, 2026