K3sServiceEndpointResource
Classsealednet10.0
Represents a Kubernetes Service exposed from a k3s cluster as an Aspire endpoint resource.
namespace Aspire.Hosting.ApplicationModel;
public sealed class K3sServiceEndpointResource : Aspire.Hosting.ApplicationModel.Resource, Aspire.Hosting.ApplicationModel.IExpressionValue, Aspire.Hosting.ApplicationModel.IManifestExpressionProvider, Aspire.Hosting.ApplicationModel.IResource, Aspire.Hosting.ApplicationModel.IResourceWithConnectionString, Aspire.Hosting.ApplicationModel.IResourceWithParent, Aspire.Hosting.ApplicationModel.IResourceWithParent<Aspire.Hosting.ApplicationModel.K3sClusterResource>, Aspire.Hosting.ApplicationModel.IResourceWithWaitSupport, Aspire.Hosting.ApplicationModel.IValueProvider, Aspire.Hosting.ApplicationModel.IValueWithReferences{ // ...}ResourceIExpressionValueIManifestExpressionProviderIResourceIResourceWithConnectionStringIResourceWithParentIResourceWithParent<K3sClusterResource>IResourceWithWaitSupportIValueProviderIValueWithReferences
9 members
Remarks
Section titled Remarks An in-process WebSocket port-forward bridges the cluster service to a host port when the cluster is ready. Dependent resources receive the service URL via the standard Aspire service-discovery environment variable
services__{name}__url : - Host processes receive
http.(s) ://localhost: {port} - Containers receive
http.(s) ://host. docker. internal: {port}
WaitFor(endpoint) on dependent resources to ensure the port-forward is active before they start. Constructors1
Section titled Constructors Represents a Kubernetes Service exposed from a k3s cluster as an Aspire endpoint resource.
Properties7
Section titled Propertiesstring? The environment variable name used to inject the service URL into dependents (
services__{name}__url ), following the Aspire service-discovery convention. ReferenceExpression Gets the manifest expression for the service URL. Resolves to
http(s)://localhost:{hostPort} when the endpoint is ready. Methods1
Section titled MethodsValueTask<string?> Returns the host-accessible service URL, or
null if the port-forward is not yet active.