KindClusterResourceBuilderExtensions
Classstaticnet10.0
Extension methods for adding Kind cluster resources to the distributed application builder.
namespace Aspire.Hosting;
public static class KindClusterResourceBuilderExtensions{ // ...}6 members
Methods6
Section titled MethodsAddKindCluster(IDistributedApplicationBuilder, string)extensionats exportIResourceBuilder<KindClusterResource> Adds a Kind cluster resource to the application model.
WithClusterLifetime(IResourceBuilder<T>, ClusterLifetime)extensionats exportIResourceBuilder<T> Sets the cluster lifetime. When
ClusterLifetime.Session (the default), the cluster is deleted when the AppHost shuts down. When ClusterLifetime.Persistent, the cluster survives AppHost restarts and is reused on next startup. WithKindConfig(IResourceBuilder<KindClusterResource>, Action<KindConfigModel>)extensionats ignoredIResourceBuilder<KindClusterResource> Customizes the Kind cluster configuration. The callback receives the
KindConfigModel after default nodes have been populated, allowing arbitrary modifications before serialization to YAML. WithKubernetesVersion(IResourceBuilder<T>, string)extensionats exportIResourceBuilder<T> Sets the Kubernetes version for the Kind cluster.
WithReference(IResourceBuilder<T>, IResourceBuilder<KindClusterResource>)extensionats exportIResourceBuilder<T> Configures a non-container resource to reference the Kind cluster by injecting kubeconfig environment variables.
WithWorkerNodes(IResourceBuilder<T>, int)extensionats exportIResourceBuilder<T> Sets the number of worker nodes for the Kind cluster.