Partilhar via


ContainerServiceAgentPool Class

Definition

ContainerServiceAgentPool.

public class ContainerServiceAgentPool : Azure.Provisioning.Primitives.ProvisionableResource
type ContainerServiceAgentPool = class
    inherit ProvisionableResource
Public Class ContainerServiceAgentPool
Inherits ProvisionableResource
Inheritance

Constructors

ContainerServiceAgentPool(String, String)

Creates a new ContainerServiceAgentPool.

Properties

AvailabilityZones

The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'.

BicepIdentifier

Gets or sets the the Bicep identifier name of the resource. This can be used to refer to the resource in expressions, but is not the Azure name of the resource. This value can contain letters, numbers, and underscores.

(Inherited from NamedProvisionableConstruct)
CapacityReservationGroupId

AKS will associate the specified agent pool with the Capacity Reservation Group.

Count

Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1.

CreationDataSourceResourceId

This is the ARM ID of the source object to be used to create the target object.

CurrentOrchestratorVersion

If orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> version being used.

DependsOn

Declares explicit dependencies on other resources.

(Inherited from ProvisionableResource)
EnableAutoScaling

Whether to enable auto-scaler.

EnableEncryptionAtHost

This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption.

EnableFips

See Add a FIPS-enabled node pool for more details.

EnableNodePublicIP

Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see assigning a public IP per node. The default is false.

EnableUltraSsd

Whether to enable UltraSSD.

GpuInstanceProfile

GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.

HostGroupId

This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see Azure dedicated hosts.

Id

Gets the Id.

IsExistingResource

Gets whether this is referencing an existing resource or we're defining a new resource.

(Inherited from ProvisionableResource)
KubeletConfig

The Kubelet configuration on the agent pool nodes.

KubeletDiskType

Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.

LinuxOSConfig

The OS configuration of Linux agent nodes.

MaxCount

The maximum number of nodes for auto-scaling.

MaxPods

The maximum number of pods that can run on a node.

MinCount

The minimum number of nodes for auto-scaling.

Mode

A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools.

Name

The name of the agent pool.

NetworkProfile

Network-related settings of an agent pool.

NodeImageVersion

The version of node image.

NodeLabels

The node labels to be persisted across all nodes in agent pool.

NodePublicIPPrefixId

This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}.

NodeTaints

The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.

OrchestratorVersion

Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see upgrading a node pool.

OSDiskSizeInGB

OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.

OSDiskType

The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see Ephemeral OS.

OSSku

Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows.

OSType

The operating system type. The default is Linux.

Parent

Gets or sets a reference to the parent ContainerServiceManagedCluster.

PodSubnetId

If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.

PowerStateCode

Tells whether the cluster is Running or Stopped.

ProvisioningState

The current deployment or provisioning state.

ProximityPlacementGroupId

The ID for Proximity Placement Group.

ResourceType

Gets the type of the resource.

(Inherited from ProvisionableResource)
ResourceVersion

Gets or sets the version of the resource.

(Inherited from ProvisionableResource)
ScaleDownMode

This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.

ScaleSetEvictionPolicy

This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'.

ScaleSetPriority

The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.

SpotMaxPrice

Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see spot VMs pricing.

SystemData

Gets the SystemData.

Tags

The tags to be persisted on the agent pool virtual machine scale set.

TypePropertiesType

The type of Agent Pool.

UpgradeSettings

Settings for upgrading the agentpool.

VmSize

VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions.

VnetSubnetId

If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.

WorkloadRuntime

Determines the type of workload a node can run.

Methods

AssignOrReplace<T>(T, T) (Inherited from ProvisionableConstruct)
Build(ProvisioningBuildOptions)

Compose the resource into a provisioning plan that can be saved as Bicep or deployed directly.

(Inherited from ProvisionableResource)
Compile()

Compile the resource into a set of Bicep statements.

(Inherited from ProvisionableResource)
DefineDictionaryProperty<T>(String, String[], Boolean, Boolean) (Inherited from ProvisionableConstruct)
DefineListProperty<T>(String, String[], Boolean, Boolean) (Inherited from ProvisionableConstruct)
DefineModelProperty<T>(String, String[], Boolean, Boolean, Boolean, String) (Inherited from ProvisionableConstruct)
DefineProperty<T>(String, String[], Boolean, Boolean, Boolean, BicepValue<T>, String) (Inherited from ProvisionableConstruct)
DefineProvisionableProperties()

Define all the provisionable properties of ContainerServiceAgentPool.

DefineResource<T>(String, String[], Boolean, Boolean, T) (Inherited from ProvisionableResource)
FromExisting(String, String)

Creates a reference to an existing ContainerServiceAgentPool.

GetProvisionableResources()

Get any resources represented by this object. This will typically only be the object itself for everything but Infrastructure.

(Inherited from Provisionable)
GetResources()

Get any resources represented by this object. This will typically only be the object itself for everything but Infrastructure.

(Inherited from Provisionable)
Initialize()

Initialize this construct.

(Inherited from ProvisionableConstruct)
OverrideWithExpression(BicepExpression) (Inherited from ProvisionableConstruct)
Resolve(ProvisioningBuildOptions)

Resolve any resources or properties that were not explicitly specified.

(Inherited from ProvisionableConstruct)
Resolve(ProvisioningContext)

Resolve any resources or properties that were not explicitly specified.

(Inherited from Provisionable)
Validate(ProvisioningBuildOptions)

Validate the presence of any required members.

(Inherited from ProvisionableResource)
Validate(ProvisioningContext)

Validate the presence of any required members.

(Inherited from Provisionable)

Applies to