AzureKubernetesEnvironmentResource

Handle
📦 Aspire.Hosting.Azure.Kubernetes v17.0.0
interface AzureKubernetesEnvironmentResource
extends IAzureResource,
IComputeEnvironmentResource,
IComputeEnvironmentWithVolumeMounts,
IResource,
IResourceWithParameters,
IAzureComputeEnvironmentResource,
IAzureNspAssociationTarget {
addCertManager(
name: string,
chartVersion?: string): CertManagerResource;
addGateway(name: string): KubernetesGatewayResource;
addHelmChart(
name: string,
chartReference: string,
chartVersion: string): KubernetesHelmChartResource;
addIngress(name: string): KubernetesIngressResource;
addLoadBalancer(
name: string,
subnet: AzureSubnetResource): AzureKubernetesLoadBalancerResource;
addNodePool(name: string, configure: (obj: AksNodePoolConfig) => Promise<void>): AksNodePoolResource;
addPersistentVolume(name: string): KubernetesPersistentVolumeResource;
withContainerRegistry(registry: AzureContainerRegistryResource): AzureKubernetesEnvironmentResource;
withSubnet(subnet: AzureSubnetResource): AzureKubernetesEnvironmentResource;
withSystemNodePool(configure: (obj: AksNodePoolConfig) => Promise<void>): AzureKubernetesEnvironmentResource;
withWorkloadIdentity(enabled?: boolean): AzureKubernetesEnvironmentResource;
}

Methods

methodaddCertManagerbuilder
Installs cert-manager into an AKS environment
addCertManager(
name: string,
chartVersion?: string): CertManagerResource
namestringThe Aspire resource name for the cert-manager installation.
chartVersionstringoptionalThe cert-manager Helm chart version to install. Defaults to a pinned version validated against this Aspire build.
CertManagerResource
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
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
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
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
methodaddNodePoolbuilder
Adds a node pool to the AKS cluster using a configuration callback.
addNodePool(name: string, configure: (obj: AksNodePoolConfig) => Promise<void>): AksNodePoolResource
namestringThe name of the node pool.
configure(obj: AksNodePoolConfig) => Promise<void>A callback to configure VM size, autoscaling, and OS SKU.
AksNodePoolResource
methodaddPersistentVolumebuilder
Adds a Kubernetes PersistentVolumeClaim resource to an AKS environment
addPersistentVolume(name: string): KubernetesPersistentVolumeResource
namestringThe name of the persistent volume resource.
KubernetesPersistentVolumeResource
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
methodwithSubnetbuilder
Configures the AKS cluster to use a VNet subnet
withSubnet(subnet: AzureSubnetResource): AzureKubernetesEnvironmentResource
subnetAzureSubnetResourceThe subnet to use for AKS node pools.
AzureKubernetesEnvironmentResource
methodwithSystemNodePoolbuilder
Replaces the system node pool using a configuration callback.
withSystemNodePool(configure: (obj: AksNodePoolConfig) => Promise<void>): AzureKubernetesEnvironmentResource
configure(obj: AksNodePoolConfig) => Promise<void>A callback to configure VM size, autoscaling, and OS SKU.
AzureKubernetesEnvironmentResource
Enables or disables workload identity on the AKS environment, allowing pods to authenticate to Azure services using federated credentials.
withWorkloadIdentity(enabled?: boolean): AzureKubernetesEnvironmentResource
enabledbooleanoptional= True`true` to enable workload identity (the default); `false` to disable it.
AzureKubernetesEnvironmentResource