CommunityToolkit.Aspire.Hosting.K3s
📦 CommunityToolkit.Aspire.Hosting.K3sv13.6.1Import path
apphost/modules/aspire16Functions
4Types
4 types, 16 functions and 15 members
Handles
Functions
DistributedApplicationBuilder
HelmReleaseResource
K3sClusterResource
method
AddHelmReleasebuilderInstalls a Helm chart into the k3s cluster.
AddHelmRelease(name string, chart string, options ...*AddHelmReleaseOptions) HelmReleaseResourcemethod
AddK8sManifestbuilderApplies Kubernetes YAML manifests or a Kustomize overlay to the cluster.
AddK8sManifest(name string, path string) K8sManifestResourcemethod
AddServiceEndpointbuilderExposes a Kubernetes Service from the cluster as an Aspire endpoint resource.
AddServiceEndpoint(name string, serviceName string, servicePort float64, options ...*AddServiceEndpointOptions) K3sServiceEndpointResourcemethod
WithAgentCountbuilderSets the number of k3s agent (worker) nodes to add to the cluster.
WithAgentCount(count float64) K3sClusterResourcemethod
WithDataVolumebuilderMounts a named Docker volume at the k3s data directory so cluster state persists across AppHost restarts.
WithDataVolume(options ...*WithDataVolumeOptions) K3sClusterResourcemethod
WithDisabledComponentbuilderDisables a built-in k3s component (
--disable=<component> ).WithDisabledComponent(component string) K3sClusterResourcemethod
WithExtraArgbuilderAppends a raw argument to the
k3s server command line.WithExtraArg(arg string) K3sClusterResourcemethod
WithHelmImagebuilderOverrides the container image used to run
helm upgrade --install for all HelmReleaseResource children of this cluster.WithHelmImage(options ...*WithHelmImageOptions) K3sClusterResourcemethod
WithK3sVersionbuilderSets the k3s image version used by the cluster server and all its agent nodes.
WithK3sVersion(tag string) K3sClusterResourcemethod
WithKubectlImagebuilderOverrides the container image used to run
kubectl apply for all K8sManifestResource children of this cluster.WithKubectlImage(options ...*WithKubectlImageOptions) K3sClusterResourcemethod
WithLifetimebuilderSets the container lifetime for the k3s cluster and all its agent nodes.
WithLifetime(lifetime ContainerLifetime) K3sClusterResourcemethod
WithPodSubnetbuilderSets the CIDR range for pod IP addresses (
--cluster-cidr ).WithPodSubnet(cidr string) K3sClusterResourcemethod
WithServiceSubnetbuilderSets the CIDR range for Service cluster IPs (
--service-cidr ).WithServiceSubnet(cidr string) K3sClusterResource