AgentPoolArgs

data class AgentPoolArgs(val administratorConfiguration: Output<AdministratorConfigurationArgs>? = null, val agentOptions: Output<AgentOptionsArgs>? = null, val agentPoolName: Output<String>? = null, val attachedNetworkConfiguration: Output<AttachedNetworkConfigurationArgs>? = null, val availabilityZones: Output<List<String>>? = null, val count: Output<Double>? = null, val extendedLocation: Output<ExtendedLocationArgs>? = null, val kubernetesClusterName: Output<String>? = null, val labels: Output<List<KubernetesLabelArgs>>? = null, val location: Output<String>? = null, val mode: Output<Either<String, AgentPoolMode>>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val taints: Output<List<KubernetesLabelArgs>>? = null, val upgradeSettings: Output<AgentPoolUpgradeSettingsArgs>? = null, val vmSkuName: Output<String>? = null) : ConvertibleToJava<AgentPoolArgs>

Uses Azure REST API version 2025-02-01. In version 2.x of the Azure Native provider, it used API version 2023-10-01-preview. Other available API versions: 2024-07-01, 2024-10-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native networkcloud [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create or update Kubernetes cluster agent pool

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var agentPool = new AzureNative.NetworkCloud.AgentPool("agentPool", new()
{
AdministratorConfiguration = new AzureNative.NetworkCloud.Inputs.AdministratorConfigurationArgs
{
AdminUsername = "azure",
SshPublicKeys = new[]
{
new AzureNative.NetworkCloud.Inputs.SshPublicKeyArgs
{
KeyData = "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm",
},
},
},
AgentOptions = new AzureNative.NetworkCloud.Inputs.AgentOptionsArgs
{
HugepagesCount = 96,
HugepagesSize = AzureNative.NetworkCloud.HugepagesSize.HugepagesSize_1G,
},
AgentPoolName = "agentPoolName",
AttachedNetworkConfiguration = new AzureNative.NetworkCloud.Inputs.AttachedNetworkConfigurationArgs
{
L2Networks = new[]
{
new AzureNative.NetworkCloud.Inputs.L2NetworkAttachmentConfigurationArgs
{
NetworkId = "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName",
PluginType = AzureNative.NetworkCloud.KubernetesPluginType.DPDK,
},
},
L3Networks = new[]
{
new AzureNative.NetworkCloud.Inputs.L3NetworkAttachmentConfigurationArgs
{
IpamEnabled = AzureNative.NetworkCloud.L3NetworkConfigurationIpamEnabled.False,
NetworkId = "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName",
PluginType = AzureNative.NetworkCloud.KubernetesPluginType.SRIOV,
},
},
TrunkedNetworks = new[]
{
new AzureNative.NetworkCloud.Inputs.TrunkedNetworkAttachmentConfigurationArgs
{
NetworkId = "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName",
PluginType = AzureNative.NetworkCloud.KubernetesPluginType.MACVLAN,
},
},
},
AvailabilityZones = new[]
{
"1",
"2",
"3",
},
Count = 3,
ExtendedLocation = new AzureNative.NetworkCloud.Inputs.ExtendedLocationArgs
{
Name = "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName",
Type = "CustomLocation",
},
KubernetesClusterName = "kubernetesClusterName",
Labels = new[]
{
new AzureNative.NetworkCloud.Inputs.KubernetesLabelArgs
{
Key = "kubernetes.label",
Value = "true",
},
},
Location = "location",
Mode = AzureNative.NetworkCloud.AgentPoolMode.System,
ResourceGroupName = "resourceGroupName",
Tags =
{
{ "key1", "myvalue1" },
{ "key2", "myvalue2" },
},
Taints = new[]
{
new AzureNative.NetworkCloud.Inputs.KubernetesLabelArgs
{
Key = "kubernetes.taint",
Value = "true:NoSchedule",
},
},
UpgradeSettings = new AzureNative.NetworkCloud.Inputs.AgentPoolUpgradeSettingsArgs
{
MaxSurge = "1",
},
VmSkuName = "NC_P46_224_v1",
});
});
package main
import (
networkcloud "github.com/pulumi/pulumi-azure-native-sdk/networkcloud/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkcloud.NewAgentPool(ctx, "agentPool", &networkcloud.AgentPoolArgs{
AdministratorConfiguration: &networkcloud.AdministratorConfigurationArgs{
AdminUsername: pulumi.String("azure"),
SshPublicKeys: networkcloud.SshPublicKeyArray{
&networkcloud.SshPublicKeyArgs{
KeyData: pulumi.String("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"),
},
},
},
AgentOptions: &networkcloud.AgentOptionsArgs{
HugepagesCount: pulumi.Float64(96),
HugepagesSize: pulumi.String(networkcloud.HugepagesSize_1G),
},
AgentPoolName: pulumi.String("agentPoolName"),
AttachedNetworkConfiguration: &networkcloud.AttachedNetworkConfigurationArgs{
L2Networks: networkcloud.L2NetworkAttachmentConfigurationArray{
&networkcloud.L2NetworkAttachmentConfigurationArgs{
NetworkId: pulumi.String("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName"),
PluginType: pulumi.String(networkcloud.KubernetesPluginTypeDPDK),
},
},
L3Networks: networkcloud.L3NetworkAttachmentConfigurationArray{
&networkcloud.L3NetworkAttachmentConfigurationArgs{
IpamEnabled: pulumi.String(networkcloud.L3NetworkConfigurationIpamEnabledFalse),
NetworkId: pulumi.String("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName"),
PluginType: pulumi.String(networkcloud.KubernetesPluginTypeSRIOV),
},
},
TrunkedNetworks: networkcloud.TrunkedNetworkAttachmentConfigurationArray{
&networkcloud.TrunkedNetworkAttachmentConfigurationArgs{
NetworkId: pulumi.String("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName"),
PluginType: pulumi.String(networkcloud.KubernetesPluginTypeMACVLAN),
},
},
},
AvailabilityZones: pulumi.StringArray{
pulumi.String("1"),
pulumi.String("2"),
pulumi.String("3"),
},
Count: pulumi.Float64(3),
ExtendedLocation: &networkcloud.ExtendedLocationArgs{
Name: pulumi.String("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName"),
Type: pulumi.String("CustomLocation"),
},
KubernetesClusterName: pulumi.String("kubernetesClusterName"),
Labels: networkcloud.KubernetesLabelArray{
&networkcloud.KubernetesLabelArgs{
Key: pulumi.String("kubernetes.label"),
Value: pulumi.String("true"),
},
},
Location: pulumi.String("location"),
Mode: pulumi.String(networkcloud.AgentPoolModeSystem),
ResourceGroupName: pulumi.String("resourceGroupName"),
Tags: pulumi.StringMap{
"key1": pulumi.String("myvalue1"),
"key2": pulumi.String("myvalue2"),
},
Taints: networkcloud.KubernetesLabelArray{
&networkcloud.KubernetesLabelArgs{
Key: pulumi.String("kubernetes.taint"),
Value: pulumi.String("true:NoSchedule"),
},
},
UpgradeSettings: &networkcloud.AgentPoolUpgradeSettingsArgs{
MaxSurge: pulumi.String("1"),
},
VmSkuName: pulumi.String("NC_P46_224_v1"),
})
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.networkcloud.AgentPool;
import com.pulumi.azurenative.networkcloud.AgentPoolArgs;
import com.pulumi.azurenative.networkcloud.inputs.AdministratorConfigurationArgs;
import com.pulumi.azurenative.networkcloud.inputs.AgentOptionsArgs;
import com.pulumi.azurenative.networkcloud.inputs.AttachedNetworkConfigurationArgs;
import com.pulumi.azurenative.networkcloud.inputs.ExtendedLocationArgs;
import com.pulumi.azurenative.networkcloud.inputs.KubernetesLabelArgs;
import com.pulumi.azurenative.networkcloud.inputs.AgentPoolUpgradeSettingsArgs;
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 agentPool = new AgentPool("agentPool", AgentPoolArgs.builder()
.administratorConfiguration(AdministratorConfigurationArgs.builder()
.adminUsername("azure")
.sshPublicKeys(SshPublicKeyArgs.builder()
.keyData("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm")
.build())
.build())
.agentOptions(AgentOptionsArgs.builder()
.hugepagesCount(96.0)
.hugepagesSize("1G")
.build())
.agentPoolName("agentPoolName")
.attachedNetworkConfiguration(AttachedNetworkConfigurationArgs.builder()
.l2Networks(L2NetworkAttachmentConfigurationArgs.builder()
.networkId("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l2Networks/l2NetworkName")
.pluginType("DPDK")
.build())
.l3Networks(L3NetworkAttachmentConfigurationArgs.builder()
.ipamEnabled("False")
.networkId("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName")
.pluginType("SRIOV")
.build())
.trunkedNetworks(TrunkedNetworkAttachmentConfigurationArgs.builder()
.networkId("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/trunkedNetworks/trunkedNetworkName")
.pluginType("MACVLAN")
.build())
.build())
.availabilityZones(
"1",
"2",
"3")
.count(3.0)
.extendedLocation(ExtendedLocationArgs.builder()
.name("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName")
.type("CustomLocation")
.build())
.kubernetesClusterName("kubernetesClusterName")
.labels(KubernetesLabelArgs.builder()
.key("kubernetes.label")
.value("true")
.build())
.location("location")
.mode("System")
.resourceGroupName("resourceGroupName")
.tags(Map.ofEntries(
Map.entry("key1", "myvalue1"),
Map.entry("key2", "myvalue2")
))
.taints(KubernetesLabelArgs.builder()
.key("kubernetes.taint")
.value("true:NoSchedule")
.build())
.upgradeSettings(AgentPoolUpgradeSettingsArgs.builder()
.maxSurge("1")
.build())
.vmSkuName("NC_P46_224_v1")
.build());
}
}

Import

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

$ pulumi import azure-native:networkcloud:AgentPool default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/kubernetesClusters/{kubernetesClusterName}/agentPools/{agentPoolName}

Constructors

Link copied to clipboard
constructor(administratorConfiguration: Output<AdministratorConfigurationArgs>? = null, agentOptions: Output<AgentOptionsArgs>? = null, agentPoolName: Output<String>? = null, attachedNetworkConfiguration: Output<AttachedNetworkConfigurationArgs>? = null, availabilityZones: Output<List<String>>? = null, count: Output<Double>? = null, extendedLocation: Output<ExtendedLocationArgs>? = null, kubernetesClusterName: Output<String>? = null, labels: Output<List<KubernetesLabelArgs>>? = null, location: Output<String>? = null, mode: Output<Either<String, AgentPoolMode>>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null, taints: Output<List<KubernetesLabelArgs>>? = null, upgradeSettings: Output<AgentPoolUpgradeSettingsArgs>? = null, vmSkuName: Output<String>? = null)

Properties

Link copied to clipboard

The administrator credentials to be used for the nodes in this agent pool.

Link copied to clipboard
val agentOptions: Output<AgentOptionsArgs>? = null

The configurations that will be applied to each agent in this agent pool.

Link copied to clipboard
val agentPoolName: Output<String>? = null

The name of the Kubernetes cluster agent pool.

Link copied to clipboard

The configuration of networks being attached to the agent pool for use by the workloads that run on this Kubernetes cluster.

Link copied to clipboard
val availabilityZones: Output<List<String>>? = null

The list of availability zones of the Network Cloud cluster used for the provisioning of nodes in this agent pool. If not specified, all availability zones will be used.

Link copied to clipboard
val count: Output<Double>? = null

The number of virtual machines that use this configuration.

Link copied to clipboard

The extended location of the cluster associated with the resource.

Link copied to clipboard
val kubernetesClusterName: Output<String>? = null

The name of the Kubernetes cluster.

Link copied to clipboard
val labels: Output<List<KubernetesLabelArgs>>? = null

The labels applied to the nodes in this agent pool.

Link copied to clipboard
val location: Output<String>? = null

The geo-location where the resource lives

Link copied to clipboard
val mode: Output<Either<String, AgentPoolMode>>? = null

The selection of how this agent pool is utilized, either as a system pool or a user pool. System pools run the features and critical services for the Kubernetes Cluster, while user pools are dedicated to user workloads. Every Kubernetes cluster must contain at least one system node pool with at least one node.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

Link copied to clipboard
val taints: Output<List<KubernetesLabelArgs>>? = null

The taints applied to the nodes in this agent pool.

Link copied to clipboard

The configuration of the agent pool.

Link copied to clipboard
val vmSkuName: Output<String>? = null

The name of the VM SKU that determines the size of resources allocated for node VMs.

Functions

Link copied to clipboard
open override fun toJava(): AgentPoolArgs