K3sClusterResource
Classsealednet10.0
Represents a k3s Kubernetes cluster running as a privileged container resource. Injects the cluster's kubeconfig into a dependent resource.
- Host processes receive
KUBECONFIG=.<host- path> /local/ kubeconfig. yaml - Containers receive
KUBECONFIG=/tmp/and a file-level bind-mount of the container-network kubeconfig variant. Both are applied by thek3s- kubeconfig. yaml Beforesubscriber registered inStart Event Add.K3s Cluster
namespace Aspire.Hosting.ApplicationModel;
public sealed class K3sClusterResource : Aspire.Hosting.ApplicationModel.ContainerResource, Aspire.Hosting.ApplicationModel.IExpressionValue, Aspire.Hosting.ApplicationModel.IManifestExpressionProvider, Aspire.Hosting.ApplicationModel.IResource, Aspire.Hosting.ApplicationModel.IResourceWithConnectionString, Aspire.Hosting.ApplicationModel.IValueProvider, Aspire.Hosting.ApplicationModel.IValueWithReferences{ // ...}ContainerResourceIExpressionValueIManifestExpressionProviderIResourceIResourceWithConnectionStringIValueProviderIValueWithReferences
7 members
Constructors1
Section titled Constructors Represents a k3s Kubernetes cluster running as a privileged container resource. Injects the cluster's kubeconfig into a dependent resource.
- Host processes receive
KUBECONFIG=.<host- path> /local/ kubeconfig. yaml - Containers receive
KUBECONFIG=/tmp/and a file-level bind-mount of the container-network kubeconfig variant. Both are applied by thek3s- kubeconfig. yaml Beforesubscriber registered inStart Event Add.K3s Cluster
Properties5
Section titled Propertiesstring?Overrides the default
ConnectionStrings__ prefix so Aspire injects KUBECONFIG.IReadOnlyDictionary<string, string> A dictionary of registered Helm releases keyed by resource name.
Methods1
Section titled MethodsValueTask<string?> Returns the host-accessible kubeconfig path for this cluster.