Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

K3sClusterResource.AddServiceEndpoint

Method
📦 CommunityToolkit.Aspire.Hosting.K3s v13.6.1
type K3sClusterResource interface {
// ... omitted for brevity
AddServiceEndpoint(
name string,
serviceName string,
servicePort float64,
options ...*AddServiceEndpointOptions,
) K3sServiceEndpointResource
}

Signature

methodAddServiceEndpointbuilder
Exposes a Kubernetes Service from the cluster as an Aspire endpoint resource.
AddServiceEndpoint(
name string,
serviceName string,
servicePort float64,
options ...*AddServiceEndpointOptions,
) K3sServiceEndpointResource
namestringThe Aspire resource name for this endpoint.
serviceNamestringThe name of the Kubernetes Service to forward, as it appears in kubectl get svc.
servicePortfloat64The port number declared on the Kubernetes Service (the port field, not targetPort). Must be in the range 1–65535.
options...*AddServiceEndpointOptionsOptional settings, described under Options.

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

Namespace*stringThe Kubernetes namespace that contains the Service. Defaults to default.
Scheme*stringThe URL scheme (http or https) for the injected environment variable. When null (the default), the scheme is inferred from the port: ports 443 and 8443 use https, all others use http.
K3sServiceEndpointResource

A builder for the K3sServiceEndpointResource.

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

Defined on

This method is defined on the following type: