# AzureKubernetesEnvironmentResource.AddHelmChart

- Module: [Aspire.Hosting.Azure.Kubernetes](/reference/api/go/aspire.hosting.azure.kubernetes.md)
- Defined on: [AzureKubernetesEnvironmentResource](/reference/api/go/aspire.hosting.azure.kubernetes/azurekubernetesenvironmentresource.md)
- Version: `17.0.0`
- Kind: `method`

Adds an external Helm chart to be installed in the AKS environment's inner Kubernetes environment. The chart is installed via `helm upgrade --install` as a pipeline step after the main application Helm chart is deployed.

## Remarks

This method delegates to the inner `KubernetesEnvironmentResource` of the AKS
environment, so the returned `KubernetesHelmChartResource` can be configured
with the same `WithHelmValue`,
`WithNamespace`,
`WithReleaseName`, and
`WithDestroy` extensions used with
non-AKS Kubernetes environments.
External Helm charts are not uninstalled by `aspire destroy` by default,
because they may be shared with workloads outside the Aspire app. Opt in by chaining
`WithDestroy`.

## Definition

```go
type AzureKubernetesEnvironmentResource interface {
    // ... omitted for brevity
    AddHelmChart(
        name string,
        chartReference string,
        chartVersion string,
    ) KubernetesHelmChartResource
}
```

## Signature

```go
AddHelmChart(
    name string,
    chartReference string,
    chartVersion string,
) KubernetesHelmChartResource
```

## Parameters

- `name` (`string`) -- The name of the Helm chart resource.
- `chartReference` (`string`) -- The Helm chart reference. Can be an OCI registry URL (e.g., `oci://quay.io/jetstack/charts/cert-manager`) or a chart name from an added repository.
- `chartVersion` (`string`) -- The chart version to install.

## Returns

[`KubernetesHelmChartResource`](/reference/api/go/aspire.hosting.azure.kubernetes/kuberneteshelmchartresource.md) -- A resource builder for the Helm chart resource.

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

## Defined on

- [AzureKubernetesEnvironmentResource](/reference/api/go/aspire.hosting.azure.kubernetes/azurekubernetesenvironmentresource.md) -- `handle`
