# AddAzureKubernetesEnvironment

- Module: [Aspire.Hosting.Azure.Kubernetes](/reference/api/go/aspire.hosting.azure.kubernetes.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: `DistributedApplicationBuilder`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

Adds an Azure Kubernetes Service (AKS) environment to the distributed application. This provisions an AKS cluster and configures it as a Kubernetes compute environment.

## Remarks

This method internally creates a Kubernetes environment for Helm-based deployment
and provisions an AKS cluster via Azure Bicep. It combines the functionality of
`AddKubernetesEnvironment` with Azure-specific provisioning.
The cluster uses the Standard control-plane tier by default, which includes an uptime SLA
and a cluster-management charge. Use `ConfigureInfrastructure` to select a different tier.

## Definition

```go
func (DistributedApplicationBuilder) AddAzureKubernetesEnvironment(name string) AzureKubernetesEnvironmentResource
```

## Parameters

- `name` (`string`) -- The name of the AKS environment resource.

## Returns

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

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

## Applies to

- `DistributedApplicationBuilder`
