LoadBalancer

class LoadBalancer : KotlinCustomResource

The configurations regarding multiple standard load balancers. If not supplied, single load balancer mode will be used. Multiple standard load balancers mode will be used if at lease one configuration is supplied. There has to be a configuration named kubernetes. Uses Azure REST API version 2024-03-02-preview. Other available API versions: 2024-04-02-preview, 2024-05-02-preview, 2024-06-02-preview, 2024-07-02-preview, 2024-09-02-preview, 2024-10-02-preview.

Example Usage

Create or update a Load Balancer

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var loadBalancer = new AzureNative.ContainerService.LoadBalancer("loadBalancer", new()
{
AllowServicePlacement = true,
LoadBalancerName = "kubernetes",
Name = "kubernetes",
PrimaryAgentPoolName = "agentpool1",
ResourceGroupName = "rg1",
ResourceName = "clustername1",
});
});
package main
import (
containerservice "github.com/pulumi/pulumi-azure-native-sdk/containerservice/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := containerservice.NewLoadBalancer(ctx, "loadBalancer", &containerservice.LoadBalancerArgs{
AllowServicePlacement: pulumi.Bool(true),
LoadBalancerName: pulumi.String("kubernetes"),
Name: pulumi.String("kubernetes"),
PrimaryAgentPoolName: pulumi.String("agentpool1"),
ResourceGroupName: pulumi.String("rg1"),
ResourceName: pulumi.String("clustername1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerservice.LoadBalancer;
import com.pulumi.azurenative.containerservice.LoadBalancerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var loadBalancer = new LoadBalancer("loadBalancer", LoadBalancerArgs.builder()
.allowServicePlacement(true)
.loadBalancerName("kubernetes")
.name("kubernetes")
.primaryAgentPoolName("agentpool1")
.resourceGroupName("rg1")
.resourceName("clustername1")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:containerservice:LoadBalancer kubernetes /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}

Properties

Link copied to clipboard

Whether to automatically place services on the load balancer. If not supplied, the default value is true. If set to false manually, both of the external and the internal load balancer will not be selected for services unless they explicitly target it.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard

Nodes that match this selector will be possible members of this load balancer.

Link copied to clipboard

Required field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a single load balancer.

Link copied to clipboard

The current provisioning state.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Only services that must match this selector can be placed on this load balancer.

Link copied to clipboard

Services created in namespaces that match the selector can be placed on this load balancer.

Link copied to clipboard

Azure Resource Manager metadata containing createdBy and modifiedBy information.

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>