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/k3s-kubeconfig.yamland a file-level bind-mount of the container-network kubeconfig variant. Both are applied by theBeforeStartEventsubscriber registered inAddK3sCluster.
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 ConstructorsProperties5
Section titled PropertiesApiEndpointgetEndpointReferenceGets the endpoint reference for the k3s API server (port 6443).
ConnectionStringEnvironmentVariablegetstring?Overrides the default
ConnectionStrings__ prefix so Aspire injects KUBECONFIG.ConnectionStringExpressiongetReferenceExpressionManifest expression for the local kubeconfig path.
HelmReleasesgetats ignoredIReadOnlyDictionary<string, string>A dictionary of registered Helm releases keyed by resource name.
Manifestsgetats ignoredIReadOnlyList<string>Names of registered
K8sManifestResource children.