K3sClusterResource Methods
ClassMethods1 member
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.
GetConnectionStringAsync(CancellationToken)Section titled GetConnectionStringAsync(CancellationToken)ValueTask<string?>Returns the host-accessible kubeconfig path for this cluster.
public sealed class K3sClusterResource{ public ValueTask<string?> GetConnectionStringAsync( CancellationToken cancellationToken = default(CancellationToken)) { // ... }}Parameters
cancellationTokenCancellationTokenoptional