# K3sClusterResource Properties

- Package: [CommunityToolkit.Aspire.Hosting.K3s](/reference/api/csharp/communitytoolkit.aspire.hosting.k3s.md)
- Type: [K3sClusterResource](/reference/api/csharp/communitytoolkit.aspire.hosting.k3s/k3sclusterresource.md)
- Kind: `Properties`
- Members: `5`

Represents a k3s Kubernetes cluster running as a privileged container resource. Injects the cluster's kubeconfig into a dependent resource.

- Host processes receive `KUBECONFIG=<host-path>/local/kubeconfig.yaml`.
- Containers receive `KUBECONFIG=/tmp/k3s-kubeconfig.yaml` and a file-level bind-mount of the container-network kubeconfig variant. Both are applied by the `BeforeStartEvent` subscriber registered in `AddK3sCluster`.

<a id="apiendpoint"></a>

## ApiEndpoint

- Name: `ApiEndpoint`
- Modifiers: `get`
- Returns: `EndpointReference`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.K3s/K3sClusterResource.cs#L69)

Gets the endpoint reference for the k3s API server (port 6443).

```csharp
public EndpointReference ApiEndpoint { get; }
```

<a id="connectionstringenvironmentvariable"></a>

## ConnectionStringEnvironmentVariable

- Name: `ConnectionStringEnvironmentVariable`
- Modifiers: `nullable` `get`
- Returns: `string?`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.K3s/K3sClusterResource.cs#L51)

Overrides the default `ConnectionStrings__` prefix so Aspire injects `KUBECONFIG`.

```csharp
public string? ConnectionStringEnvironmentVariable { get; }
```

<a id="connectionstringexpression"></a>

## ConnectionStringExpression

- Name: `ConnectionStringExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.K3s/K3sClusterResource.cs#L55-L57)

Manifest expression for the local kubeconfig path.

```csharp
public ReferenceExpression ConnectionStringExpression { get; }
```

<a id="helmreleases"></a>

## HelmReleases

- Name: `HelmReleases`
- Modifiers: `get`
- Returns: `IReadOnlyDictionary<string, string>`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.K3s/K3sClusterResource.cs#L91)

A dictionary of registered Helm releases keyed by resource name.

```csharp
public IReadOnlyDictionary<string, string> HelmReleases { get; }
```

## ATS metadata

### Ignored by ATS

- Reason: Internal tracking collection; not needed by guest SDK consumers.

<a id="manifests"></a>

## Manifests

- Name: `Manifests`
- Modifiers: `get`
- Returns: `IReadOnlyList<string>`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.K3s/K3sClusterResource.cs#L100)

Names of registered [K8sManifestResource](/reference/api/csharp/communitytoolkit.aspire.hosting.k3s/k8smanifestresource.md) children.

```csharp
public IReadOnlyList<string> Manifests { get; }
```

## ATS metadata

### Ignored by ATS

- Reason: Internal tracking collection; not needed by guest SDK consumers.
