Skip to content
DocsTry Aspire
DocsTry

K3sServiceEndpointResource Properties

ClassProperties7 members
Represents a Kubernetes Service exposed from a k3s cluster as an Aspire endpoint resource.
ConnectionStringEnvironmentVariableSection titled ConnectionStringEnvironmentVariablenullablestring?
The environment variable name used to inject the service URL into dependents ( services__{name}__url), following the Aspire service-discovery convention.
public string? ConnectionStringEnvironmentVariable { get; }
ConnectionStringExpressionSection titled ConnectionStringExpressionReferenceExpression
Gets the manifest expression for the service URL. Resolves to http(s)://localhost:{hostPort} when the endpoint is ready.
public ReferenceExpression ConnectionStringExpression { get; }
Gets the host port bound by the port-forward listener.
public int HostPort { get; }
Zero until the resource transitions to Running. Use WaitFor(endpoint) to ensure this is populated before reading it from a dependent resource.
Gets the Kubernetes namespace that contains the Service.
public string Namespace { get; }
Gets the parent resource of type K3sClusterResource.
public K3sClusterResource Parent { get; }
Gets the name of the Kubernetes Service being forwarded.
public string ServiceName { get; }
Gets the port number declared on the Kubernetes Service.
public int ServicePort { get; }