Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

IKindResource

Handle
📦 CommunityToolkit.Aspire.Hosting.Kind v13.5.1-beta.895
type IKindResource interface{}

Methods

methodWithClusterLifetimebuilder
Sets the cluster lifetime. When Session (the default), the cluster is deleted on graceful shutdown or other process-exit signals on a best-effort basis. When Persistent, the cluster survives AppHost restarts and is reused on next startup.
WithClusterLifetime(lifetime ClusterLifetime) IKindResource
lifetimeClusterLifetimeThe desired cluster lifetime.
IKindResource

A reference to the IResourceBuilder.

Returns a handle; failures surface later via Err().

Sets the Kubernetes version for the Kind cluster.
WithKubernetesVersion(version string) IKindResource
versionstringThe Kubernetes version (e.g., "v1.32.2").
IKindResource

A reference to the IResourceBuilder.

Returns a handle; failures surface later via Err().

methodWithNodeImagebuilder
Sets the Kind node image for every node in the cluster.
WithNodeImage(image string) IKindResource
imagestringThe fully qualified Kind node image, such as kindest/node:v1.33.1. This overrides the image that would otherwise be derived from WithKubernetesVersion.
IKindResource

A reference to the IResourceBuilder.

Returns a handle; failures surface later via Err().

methodWithNodeMountbuilder
Adds an extra host mount to every Kind node container.
WithNodeMount(
hostPath string,
containerPath string,
options ...*WithNodeMountOptions,
) IKindResource
hostPathstringThe path on the host. Relative paths are resolved against the AppHost directory before being written to the Kind config.
containerPathstringThe absolute path inside the Kind node container.
options...*WithNodeMountOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithNodeMountOptions argument.

ReadOnly*booltrue to mount the path read-only.
IKindResource

A reference to the IResourceBuilder.

Returns a handle; failures surface later via Err().

methodWithWorkerNodesbuilder
Sets the number of worker nodes for the Kind cluster.
WithWorkerNodes(count float64) IKindResource
countfloat64The number of worker nodes. Must be zero or greater.
IKindResource

A reference to the IResourceBuilder.

Returns a handle; failures surface later via Err().