# WithKindContainerReference

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

Configures a container resource to reference the Kind cluster by bind-mounting the container-compatible kubeconfig, injecting environment variables, and connecting to the Kind container network.

## Remarks

This overload is the primary integration path for containers. It:
-
-
-
-
The container-compatible kubeconfig uses the Kind control-plane container name
(`{clusterName}-control-plane`) instead of `127.0.0.1`, enabling container-to-container
communication over the Kind container network.

## Definition

```go
func (ContainerResource) WithKindContainerReference(kind KindClusterResource) ContainerResource
```

## Parameters

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

## Returns

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

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

## Applies to

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