Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

KubernetesIngressResource.WithIngressPath

Method
📦 Aspire.Hosting.Kubernetes v13.6.5-preview.1.26559.7
type KubernetesIngressResource interface {
// ... omitted for brevity
WithIngressPath(
path string,
endpoint EndpointReference,
options ...*WithIngressPathOptions,
) 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,
options ...*WithIngressPathOptions,
) KubernetesIngressResource
pathstringThe URL path to match (e.g., "/" or "/api"). Must start with /.
endpointEndpointReferenceThe endpoint reference identifying the target service and port.
options...*WithIngressPathOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithIngressPathOptions argument.

PathType*IngressPathTypeThe path matching strategy. Defaults to Prefix.
KubernetesIngressResource

The resource builder.

Returns a handle; failures surface later via Err().

Defined on

This method is defined on the following type: