Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AzureKubernetesEnvironmentResource

Handle
📦 Aspire.Hosting.Azure.Kubernetes v17.0.0
type AzureKubernetesEnvironmentResource interface {
ComputeEnvironmentResource
Resource
}

Methods

methodAddCertManagerbuilder
Installs cert-manager into an AKS environment
AddCertManager(
name string,
options ...*AddCertManagerOptions,
) CertManagerResource
namestringThe Aspire resource name for the cert-manager installation.
options...*AddCertManagerOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddCertManagerOptions argument.

ChartVersion*stringThe cert-manager Helm chart version to install. Defaults to a pinned version validated against this Aspire build.
CertManagerResource

The resource builder.

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

methodAddGatewaybuilder
Adds a Kubernetes Gateway API Gateway resource to the application model, associated with the inner Kubernetes environment of the specified AKS environment.
AddGateway(name string) KubernetesGatewayResource
namestringThe name of the gateway resource.
KubernetesGatewayResource

The resource builder.

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

methodAddHelmChartbuilder
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.
AddHelmChart(
name string,
chartReference string,
chartVersion string,
) KubernetesHelmChartResource
namestringThe name of the Helm chart resource.
chartReferencestringThe 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.
chartVersionstringThe chart version to install.
KubernetesHelmChartResource

A resource builder for the Helm chart resource.

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

methodAddIngressbuilder
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.
AddIngress(name string) KubernetesIngressResource
namestringThe name of the ingress resource.
KubernetesIngressResource

The resource builder.

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

methodAddLoadBalancerbuilder
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.
AddLoadBalancer(
name string,
subnet AzureSubnetResource,
) AzureKubernetesLoadBalancerResource
namestringThe name of the load balancer resource. Used to derive the in-cluster ApplicationLoadBalancer name (alb-{name}) referenced by gateway/ingress annotations.
subnetAzureSubnetResourceA subnet that will be associated with the AGC ALB. The subnet is automatically delegated to Microsoft.ServiceNetworking/trafficControllers; this is required by AGC and is idempotent across multiple AddLoadBalancer calls against the same subnet.
AzureKubernetesLoadBalancerResource

The resource builder.

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

methodAddNodePoolbuilder
Adds a node pool to the AKS cluster using a configuration callback.
AddNodePool(
name string,
configure func(obj *AksNodePoolConfig),
) AksNodePoolResource
namestringThe name of the node pool.
configurefunc(obj *AksNodePoolConfig)callbackA callback to configure VM size, autoscaling, and OS SKU.
AksNodePoolResource

The resource builder for the new node pool.

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

methodAddPersistentVolumebuilder
Adds a Kubernetes PersistentVolumeClaim resource to an AKS environment
AddPersistentVolume(name string) KubernetesPersistentVolumeResource
namestringThe name of the persistent volume resource.
KubernetesPersistentVolumeResource

The resource builder.

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

Configures the AKS environment to use a specific Azure Container Registry for image storage. When set, this replaces the auto-created default container registry.
WithContainerRegistry(registry AzureContainerRegistryResource) AzureKubernetesEnvironmentResource
registryAzureContainerRegistryResourceThe Azure Container Registry resource builder.
AzureKubernetesEnvironmentResource

The resource builder.

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

methodWithSubnetbuilder
Configures the AKS cluster to use a VNet subnet
WithSubnet(subnet AzureSubnetResource) AzureKubernetesEnvironmentResource
subnetAzureSubnetResourceThe subnet to use for AKS node pools.
AzureKubernetesEnvironmentResource

The resource builder.

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

methodWithSystemNodePoolbuilder
Replaces the system node pool using a configuration callback.
WithSystemNodePool(configure func(obj *AksNodePoolConfig)) AzureKubernetesEnvironmentResource
configurefunc(obj *AksNodePoolConfig)callbackA callback to configure VM size, autoscaling, and OS SKU.
AzureKubernetesEnvironmentResource

The AKS environment resource builder for chaining.

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

Enables or disables workload identity on the AKS environment, allowing pods to authenticate to Azure services using federated credentials.
WithWorkloadIdentity(options ...*WithWorkloadIdentityOptions) AzureKubernetesEnvironmentResource
options...*WithWorkloadIdentityOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithWorkloadIdentityOptions argument.

Enabled*booltrue to enable workload identity (the default); false to disable it.
AzureKubernetesEnvironmentResource

The resource builder.

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