Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

CommunityToolkit.Aspire.Hosting.K3s

📦 CommunityToolkit.Aspire.Hosting.K3sv13.6.1
Import pathapphost/modules/aspire
16Functions
4Types

Handles

Functions

K3sClusterResource

methodAddHelmReleasebuilder
Installs a Helm chart into the k3s cluster.
AddHelmRelease(name string, chart string, options ...*AddHelmReleaseOptions) HelmReleaseResource
methodAddK8sManifestbuilder
Applies Kubernetes YAML manifests or a Kustomize overlay to the cluster.
AddK8sManifest(name string, path string) K8sManifestResource
methodAddServiceEndpointbuilder
Exposes a Kubernetes Service from the cluster as an Aspire endpoint resource.
AddServiceEndpoint(name string, serviceName string, servicePort float64, options ...*AddServiceEndpointOptions) K3sServiceEndpointResource
methodWithAgentCountbuilder
Sets the number of k3s agent (worker) nodes to add to the cluster.
WithAgentCount(count float64) K3sClusterResource
methodWithDataVolumebuilder
Mounts a named Docker volume at the k3s data directory so cluster state persists across AppHost restarts.
WithDataVolume(options ...*WithDataVolumeOptions) K3sClusterResource
methodWithDisabledComponentbuilder
Disables a built-in k3s component (--disable=<component>).
WithDisabledComponent(component string) K3sClusterResource
methodWithExtraArgbuilder
Appends a raw argument to the k3s server command line.
WithExtraArg(arg string) K3sClusterResource
methodWithHelmImagebuilder
Overrides the container image used to run helm upgrade --install for all HelmReleaseResource children of this cluster.
WithHelmImage(options ...*WithHelmImageOptions) K3sClusterResource
methodWithK3sVersionbuilder
Sets the k3s image version used by the cluster server and all its agent nodes.
WithK3sVersion(tag string) K3sClusterResource
methodWithKubectlImagebuilder
Overrides the container image used to run kubectl apply for all K8sManifestResource children of this cluster.
WithKubectlImage(options ...*WithKubectlImageOptions) K3sClusterResource
methodWithLifetimebuilder
Sets the container lifetime for the k3s cluster and all its agent nodes.
WithLifetime(lifetime ContainerLifetime) K3sClusterResource
methodWithPodSubnetbuilder
Sets the CIDR range for pod IP addresses (--cluster-cidr).
WithPodSubnet(cidr string) K3sClusterResource
methodWithServiceSubnetbuilder
Sets the CIDR range for Service cluster IPs (--service-cidr).
WithServiceSubnet(cidr string) K3sClusterResource