withIngressHostAndPath

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

Signature

methodwithIngressHostAndPathbuilder
Adds a host-scoped path rule to the ingress. The rule matches traffic for the specified host and path, forwarding it to the given endpoint's backing Kubernetes service.
withIngressHostAndPath(
host: string,
path: string,
endpoint: EndpointReference,
pathType?: IngressPathType): KubernetesIngressResource
hoststringThe hostname to match (e.g., `"api.example.com"`).
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

Applies to

This method applies to the following types: