# AzureKubernetesEnvironmentResource

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

## Definition

```go
type AzureKubernetesEnvironmentResource interface {
    ComputeEnvironmentResource
    Resource
}
```

## Embeds

- `ComputeEnvironmentResource`
- `Resource`

## Methods

- [AddCertManager](/reference/api/go/aspire.hosting.azure.kubernetes/azurekubernetesenvironmentresource/addcertmanager.md) -- `method` -- Installs cert-manager into an AKS environment
  ```go
  AddCertManager(name string, options ...*AddCertManagerOptions) CertManagerResource
  ```
- [AddGateway](/reference/api/go/aspire.hosting.azure.kubernetes/azurekubernetesenvironmentresource/addgateway.md) -- `method` -- Adds a Kubernetes Gateway API Gateway resource to the application model, associated with the inner Kubernetes environment of the specified AKS environment.
  ```go
  AddGateway(name string) KubernetesGatewayResource
  ```
- [AddHelmChart](/reference/api/go/aspire.hosting.azure.kubernetes/azurekubernetesenvironmentresource/addhelmchart.md) -- `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.
  ```go
  AddHelmChart(name string, chartReference string, chartVersion string) KubernetesHelmChartResource
  ```
- [AddIngress](/reference/api/go/aspire.hosting.azure.kubernetes/azurekubernetesenvironmentresource/addingress.md) -- `method` -- Adds a Kubernetes Ingress resource to the application model, associated with the inner Kubernetes environment of the specified AKS environment. The ingress generates a `networking.k8s.io/v1 Ingress` resource in the Helm chart output at publish time.
  ```go
  AddIngress(name string) KubernetesIngressResource
  ```
- [AddLoadBalancer](/reference/api/go/aspire.hosting.azure.kubernetes/azurekubernetesenvironmentresource/addloadbalancer.md) -- `method` -- Adds an Azure Application Gateway for Containers (AGC) `ApplicationLoadBalancer` to this AKS environment, bound to the supplied delegated subnet. Returns a resource builder that can be passed to `gateway.WithLoadBalancer(lb)` / `ingress.WithLoadBalancer(lb)` to route traffic through this load balancer.
  ```go
  AddLoadBalancer(name string, subnet AzureSubnetResource) AzureKubernetesLoadBalancerResource
  ```
- [AddNodePool](/reference/api/go/aspire.hosting.azure.kubernetes/azurekubernetesenvironmentresource/addnodepool.md) -- `method` -- Adds a node pool to the AKS cluster using a configuration callback.
  ```go
  AddNodePool(name string, configure func(obj *AksNodePoolConfig)) AksNodePoolResource
  ```
- [AddPersistentVolume](/reference/api/go/aspire.hosting.azure.kubernetes/azurekubernetesenvironmentresource/addpersistentvolume.md) -- `method` -- Adds a Kubernetes PersistentVolumeClaim resource to an AKS environment
  ```go
  AddPersistentVolume(name string) KubernetesPersistentVolumeResource
  ```
- [WithContainerRegistry](/reference/api/go/aspire.hosting.azure.kubernetes/azurekubernetesenvironmentresource/withcontainerregistry.md) -- `method` -- Configures the AKS environment to use a specific Azure Container Registry for image storage. When set, this replaces the auto-created default container registry.
  ```go
  WithContainerRegistry(registry AzureContainerRegistryResource) AzureKubernetesEnvironmentResource
  ```
- [WithSubnet](/reference/api/go/aspire.hosting.azure.kubernetes/azurekubernetesenvironmentresource/withsubnet.md) -- `method` -- Configures the AKS cluster to use a VNet subnet
  ```go
  WithSubnet(subnet AzureSubnetResource) AzureKubernetesEnvironmentResource
  ```
- [WithSystemNodePool](/reference/api/go/aspire.hosting.azure.kubernetes/azurekubernetesenvironmentresource/withsystemnodepool.md) -- `method` -- Replaces the system node pool using a configuration callback.
  ```go
  WithSystemNodePool(configure func(obj *AksNodePoolConfig)) AzureKubernetesEnvironmentResource
  ```
- [WithWorkloadIdentity](/reference/api/go/aspire.hosting.azure.kubernetes/azurekubernetesenvironmentresource/withworkloadidentity.md) -- `method` -- Enables or disables workload identity on the AKS environment, allowing pods to authenticate to Azure services using federated credentials.
  ```go
  WithWorkloadIdentity(options ...*WithWorkloadIdentityOptions) AzureKubernetesEnvironmentResource
  ```
