Skip to content
DocsTry Aspire
DocsTry

AzureKubernetesEnvironmentResource.addLoadBalancer

Method
📦 Aspire.Hosting.Azure.Kubernetes v13.4.0-preview.1.26281.18
interface AzureKubernetesEnvironmentResource {
// ... omitted for brevity
addLoadBalancer(
name: string,
subnet: AzureSubnetResource): AzureKubernetesLoadBalancerResource;
}

Signature

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

Defined on

This method is defined on the following type: