CommunityToolkit.Aspire.Hosting.K3s
📦 CommunityToolkit.Aspire.Hosting.K3sv13.5.016Functions
4Types
4 types and 16 members
Types
Functions
method
addHelmReleasebuilderInstalls a Helm chart into the k3s cluster.
addHelmRelease(name: string, chart: string, repo?: string, version?: string, namespace?: string): HelmReleaseResourcemethod
addK3sClusterbuilderAdds a k3s Kubernetes cluster to the distributed application.
addK3sCluster(name: string, apiServerPort?: number, agentCount?: number): K3sClusterResourcemethod
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: number, namespace?: string, scheme?: string): K3sServiceEndpointResourcemethod
withAgentCountbuilderSets the number of k3s agent (worker) nodes to add to the cluster.
withAgentCount(count: number): K3sClusterResourcemethod
withDataVolumebuilderMounts a named Docker volume at the k3s data directory so cluster state persists across AppHost restarts.
withDataVolume(name?: string): 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(tag?: string, image?: string, registry?: string): K3sClusterResourcemethod
withHelmValuebuilderAdds a Helm `--set key=value` override to the release.
withHelmValue(key: string, value: string): HelmReleaseResourcemethod
withHelmValuesFilebuilderSupplies a YAML values file to the Helm release (`--values`).
withHelmValuesFile(path: string): HelmReleaseResourcemethod
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(tag?: string, image?: string, registry?: string): 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