Skip to content
DocsTry Aspire
DocsTry

AzureKubernetesEnvironmentResource

Handle
📦 Aspire.Hosting.Azure.Kubernetes v13.4.0-preview.1.26281.18
interface AzureKubernetesEnvironmentResource
extends IAzureResource,
IComputeEnvironmentResource,
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,
vmSize?: string,
minCount?: number,
maxCount?: number): AksNodePoolResource;
withContainerRegistry(registry: AzureContainerRegistryResource): AzureKubernetesEnvironmentResource;
withSubnet(subnet: AzureSubnetResource): AzureKubernetesEnvironmentResource;
withSystemNodePool(
vmSize?: string,
minCount?: number,
maxCount?: number): AzureKubernetesEnvironmentResource;
withWorkloadIdentity(enabled?: boolean): AzureKubernetesEnvironmentResource;
}

Methods

methodaddCertManagerbuilder
Installs cert-manager into an AKS environment
addCertManager(
name: string,
chartVersion?: string): CertManagerResource
namestring
chartVersionstringoptional
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
namestring
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
namestring
chartReferencestring
chartVersionstring
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
namestring
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
namestring
subnetAzureSubnetResource
AzureKubernetesLoadBalancerResource
methodaddNodePoolbuilder
Adds a node pool to the AKS cluster.
addNodePool(
name: string,
vmSize?: string,
minCount?: number,
maxCount?: number): AksNodePoolResource
namestring
vmSizestringoptional= Standard_D2s_v5
minCountnumberoptional= 1
maxCountnumberoptional= 3
AksNodePoolResource
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
registryAzureContainerRegistryResource
AzureKubernetesEnvironmentResource
methodwithSubnetbuilder
Configures the AKS cluster to use a VNet subnet
withSubnet(subnet: AzureSubnetResource): AzureKubernetesEnvironmentResource
subnetAzureSubnetResource
AzureKubernetesEnvironmentResource
methodwithSystemNodePoolbuilder
Replaces the default system node pool with a customized configuration.
withSystemNodePool(
vmSize?: string,
minCount?: number,
maxCount?: number): AzureKubernetesEnvironmentResource
vmSizestringoptional= Standard_D2s_v5
minCountnumberoptional= 1
maxCountnumberoptional= 3
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
AzureKubernetesEnvironmentResource