withGatewayHostRoute
Method
interface KubernetesGatewayResource { // ... omitted for brevity withGatewayHostRoute( host: string, path: string, endpoint: EndpointReference, pathType?: GatewayPathMatchType): KubernetesGatewayResource;}Signature
method
withGatewayHostRoute builder Adds a host-and-path-based routing rule to the gateway. The rule matches traffic for the specified host and path, routing it to the given endpoint's backing Kubernetes service. This generates an `HTTPRoute` resource with a `hostnames` filter.
withGatewayHostRoute( host: string, path: string, endpoint: EndpointReference, pathType?: GatewayPathMatchType): KubernetesGatewayResourceParameters
host string path string endpoint EndpointReference pathType GatewayPathMatchType optional = PathPrefix Returns
KubernetesGatewayResource Applies to
This method applies to the following types: