Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithIngressHostAndPath

Method
📦 Aspire.Hosting.Kubernetes v13.6.5-preview.1.26559.7
func (KubernetesIngressResource) WithIngressHostAndPath(
host string,
path string,
endpoint EndpointReference,
options ...*WithIngressHostAndPathOptions,
) 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,
options ...*WithIngressHostAndPathOptions,
) 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.
options...*WithIngressHostAndPathOptionsOptional settings, described under Options.

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

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

The resource builder.

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

Applies to

This method applies to the following types: