InterceptorRoute Latest

Field-by-field API reference for the InterceptorRoute custom resource

Suggest a change
API versionhttp.keda.sh/v1beta1
KindInterceptorRoute
ScopeNamespaced

Example

apiVersion: http.keda.sh/v1beta1
kind: InterceptorRoute
metadata:
  name: my-app
  namespace: default
spec:
  target:
    service: my-app-svc
    port: 8080
  rules:
    - hosts:
        - app.example.com
      paths:
        - value: /api
  scalingMetric:
    concurrency:
      targetValue: 100

spec

FieldTypeRequiredDefaultDescription
targetTargetRefYesBackend service to route traffic to.
rules[]RoutingRuleNoRouting rules that define how requests are matched to this target.
scalingMetricScalingMetricSpecYesMetric configuration for autoscaling.
coldStartColdStartSpecNoCold start behavior when scaling from zero.
timeoutsInterceptorRouteTimeoutsNoTimeout configuration for request handling.

For usage guidance, see Configure Routing Rules and Configure Scaling Metrics.

TargetRef

Identifies a Service to route traffic to. Exactly one of port or portName must be set.

FieldTypeRequiredDefaultDescription
servicestringYesName of the Kubernetes Service. Minimum length: 1.
portint32NoPort number on the Service (1–65535). Mutually exclusive with portName.
portNamestringNoNamed port on the Service. Minimum length: 1. Mutually exclusive with port.

Validation: Exactly one of port or portName must be set. Setting both or neither produces a validation error.

RoutingRule

Defines a set of matching criteria for routing requests. All specified fields within a single rule use AND semantics (host AND path AND headers must match). Multiple rules use OR semantics (any rule can match).

FieldTypeRequiredDefaultDescription
hosts[]stringNoHostnames to match. Wildcard patterns (e.g., *.example.com) are supported. A single * acts as a catch-all. Exact matches take priority over wildcards; more specific wildcards (e.g., *.bar.example.com) take priority over less specific ones.
paths[]PathMatchNoPath prefixes to match. When multiple paths match, the longest prefix wins.
headers[]HeaderMatchNoHeaders that must all match the request (AND semantics).

PathMatch

FieldTypeRequiredDefaultDescription
valuestringYesPath prefix to match against. The longest matching prefix wins. Minimum length: 1.

HeaderMatch

FieldTypeRequiredDefaultDescription
namestringYesName of the HTTP header. Minimum length: 1.
value*stringNoValue to match against (exact match). If omitted, matches any value for the given header name.

ScalingMetricSpec

Defines what metric drives autoscaling. At least one of concurrency or requestRate must be set. When both are set, both metrics are reported and KEDA scales based on whichever demands more replicas.

FieldTypeRequiredDefaultDescription
concurrency*ConcurrencyTargetSpecNoScale based on concurrent request count.
requestRate*RequestRateTargetSpecNoScale based on request rate.

Validation: At least one of concurrency or requestRate must be set.

ConcurrencyTargetSpec

FieldTypeRequiredDefaultDescription
targetValueint32YesTarget concurrent request count per replica. Minimum: 1.

RequestRateTargetSpec

FieldTypeRequiredDefaultDescription
targetValueint32YesTarget request rate per replica. Minimum: 1.
windowDurationNo1mSliding time window over which the request rate is calculated.
granularityDurationNo1sBucket size for rate calculation within the window.

ColdStartSpec

Configures behavior while the target is not ready (scaling from zero).

FieldTypeRequiredDefaultDescription
fallback*TargetRefYesFallback service to route to when the target is scaling from zero and the wait timeout expires.

Validation: The fallback field must be set.

InterceptorRouteTimeouts

Configures per-route request handling timeouts. When a field is unset, the global interceptor timeout configuration (KEDA_HTTP_*_TIMEOUT environment variables) is used.

FieldTypeRequiredDefaultDescription
readiness*DurationNoGlobal KEDA_HTTP_READINESS_TIMEOUTTime to wait for the backend to become ready (e.g., scale from zero). Set to 0s to disable the dedicated readiness deadline so the full request budget is available for cold starts. When a fallback service is configured and this is 0s, a 30s default is applied.
request*DurationNoGlobal KEDA_HTTP_REQUEST_TIMEOUTTotal time allowed for the entire request lifecycle. Set to 0s to disable the request deadline.
responseHeader*DurationNoGlobal KEDA_HTTP_RESPONSE_HEADER_TIMEOUTMaximum time to wait for response headers from the backend after the request has been sent. Does not include cold-start wait time. Set to 0s to disable the response header deadline.

status

FieldTypeDescription
conditions[]metav1.ConditionConditions of the InterceptorRoute. Keyed by type.

Condition types

TypeDescription
ReadyWhether the InterceptorRoute is fully reconciled and routing traffic.