# K3sClusterResource.AddHelmRelease

- Module: [CommunityToolkit.Aspire.Hosting.K3s](/reference/api/go/communitytoolkit.aspire.hosting.k3s.md)
- Defined on: [K3sClusterResource](/reference/api/go/communitytoolkit.aspire.hosting.k3s/k3sclusterresource.md)
- Version: `13.6.1`
- Kind: `method`

Installs a Helm chart into the k3s cluster.

## Remarks

The release runs as an `alpine/helm` container on the DCP network. No host-side
`helm` binary is required. The container exits with code 0 when the release is
fully installed and all workloads are ready. Use `WaitForCompletion(helmRelease)`
on resources that must start only after the chart is ready.
Customize the release with `WithHelmValue` for individual key/value pairs
or `WithHelmValuesFile` to supply a full YAML values file.

## Definition

```go
type K3sClusterResource interface {
    // ... omitted for brevity
    AddHelmRelease(
        name string,
        chart string,
        options ...*AddHelmReleaseOptions,
    ) HelmReleaseResource
}
```

## Signature

```go
AddHelmRelease(
    name string,
    chart string,
    options ...*AddHelmReleaseOptions,
) HelmReleaseResource
```

## Parameters

- `name` (`string`) -- The Aspire resource name; also used as the Helm release name passed to `helm upgrade --install`.
- `chart` (`string`) -- The chart name, e.g. `argo-cd` for a repo chart or `oci://registry/chart` for an OCI reference. Provide `repo` when using a named repo chart.
- `options` (`...*AddHelmReleaseOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*AddHelmReleaseOptions` argument.

- `Repo` (`*string`) -- Optional Helm repository URL, e.g. `https://argoproj.github.io/argo-helm`. When provided, the repo is added and updated before installation.
- `Version` (`*string`) -- Optional chart version to pin, e.g. `7.8.0`. When `null` the latest version available in the repository is installed.
- `Namespace` (`*string`) -- The Kubernetes namespace to install the release into. The namespace is created automatically if it does not exist. Defaults to `default`.

## Returns

[`HelmReleaseResource`](/reference/api/go/communitytoolkit.aspire.hosting.k3s/helmreleaseresource.md) -- A builder for the `HelmReleaseResource`.

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

## Defined on

- [K3sClusterResource](/reference/api/go/communitytoolkit.aspire.hosting.k3s/k3sclusterresource.md) -- `handle`
