# WithKindClusterReference

- Module: [CommunityToolkit.Aspire.Hosting.Kind](/reference/api/go/communitytoolkit.aspire.hosting.kind.md)
- Version: `13.5.1-beta.895`
- Kind: `method`
- Defined on: `ResourceWithEnvironment`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/2c26a4c9649531d17fce3cbc4c5dea00d61d279c)

Configures a non-container resource to reference the Kind cluster by injecting kubeconfig environment variables.

## Remarks

This overload sets `KUBECONFIG` to the host kubeconfig path, which is appropriate for
resources that execute on the host (e.g., executables, projects).
For container resources, use the `WithReference`
overload instead, which handles container-specific requirements like bind-mounting and network connectivity.

## Definition

```go
func (ResourceWithEnvironment) WithKindClusterReference(kind KindClusterResource) ResourceWithEnvironment
```

## Parameters

- `kind` ([`KindClusterResource`](/reference/api/go/communitytoolkit.aspire.hosting.kind/kindclusterresource.md)) -- The Kind cluster resource builder.

## Returns

`ResourceWithEnvironment` -- A reference to the `IResourceBuilder`.

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

## Applies to

- `CSharpAppResource`
- `ContainerResource`
- `DotnetToolResource`
- `ExecutableResource`
- [`KubernetesAspireDashboardResource`](/reference/api/go/communitytoolkit.aspire.hosting.kind/kubernetesaspiredashboardresource.md)
- `ProjectResource`
