KubernetesIngressResource.withIngressPath

Method
📦 Aspire.Hosting.Kubernetes v17.0.0
interface KubernetesIngressResource {
// ... omitted for brevity
withIngressPath(
path: string,
endpoint: EndpointReference,
pathType?: IngressPathType): KubernetesIngressResource;
}

Signature

methodwithIngressPathbuilder
Adds a path-based rule to the ingress. The rule matches each hostname configured with `WithHostname`, or all hosts when no hostname is configured, and forwards matching traffic to the endpoint's backing Kubernetes service.
withIngressPath(
path: string,
endpoint: EndpointReference,
pathType?: IngressPathType): KubernetesIngressResource
pathstringThe URL path to match (e.g., `"/"` or `"/api"`). Must start with `/`.
endpointEndpointReferenceThe endpoint reference identifying the target service and port.
pathTypeIngressPathTypeoptional= PrefixThe path matching strategy. Defaults to `Prefix`.
KubernetesIngressResource

Defined on

This method is defined on the following type: