共用方式為


ManagedClusterAgentPoolProfile Class

Profile for the container service agent pool.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to server.

Inheritance
azure.mgmt.containerservice.v2023_03_01.models._models_py3.ManagedClusterAgentPoolProfileProperties
ManagedClusterAgentPoolProfile

Constructor

ManagedClusterAgentPoolProfile(*, name: str, count: int | None = None, vm_size: str | None = None, os_disk_size_gb: int | None = None, os_disk_type: str | _models.OSDiskType | None = None, kubelet_disk_type: str | _models.KubeletDiskType | None = None, workload_runtime: str | _models.WorkloadRuntime | None = None, vnet_subnet_id: str | None = None, pod_subnet_id: str | None = None, max_pods: int | None = None, os_type: str | _models.OSType = 'Linux', os_sku: str | _models.OSSKU | None = None, max_count: int | None = None, min_count: int | None = None, enable_auto_scaling: bool | None = None, scale_down_mode: str | _models.ScaleDownMode | None = None, type: str | _models.AgentPoolType | None = None, mode: str | _models.AgentPoolMode | None = None, orchestrator_version: str | None = None, upgrade_settings: _models.AgentPoolUpgradeSettings | None = None, power_state: _models.PowerState | None = None, availability_zones: List[str] | None = None, enable_node_public_ip: bool | None = None, node_public_ip_prefix_id: str | None = None, scale_set_priority: str | _models.ScaleSetPriority = 'Regular', scale_set_eviction_policy: str | _models.ScaleSetEvictionPolicy = 'Delete', spot_max_price: float = -1, tags: Dict[str, str] | None = None, node_labels: Dict[str, str] | None = None, node_taints: List[str] | None = None, proximity_placement_group_id: str | None = None, kubelet_config: _models.KubeletConfig | None = None, linux_os_config: _models.LinuxOSConfig | None = None, enable_encryption_at_host: bool | None = None, enable_ultra_ssd: bool | None = None, enable_fips: bool | None = None, gpu_instance_profile: str | _models.GPUInstanceProfile | None = None, creation_data: _models.CreationData | None = None, host_group_id: str | None = None, **kwargs: Any)

Keyword-Only Parameters

Name Description
count
int

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.

vm_size
str

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.

os_disk_size_gb
int

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.

os_disk_type

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. Known values are: "Managed" and "Ephemeral".

kubelet_disk_type

Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary".

workload_runtime

Determines the type of workload a node can run. Known values are: "OCIContainer" and "WasmWasi".

vnet_subnet_id
str

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}. # pylint: disable=line-too-long

pod_subnet_id
str

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}. # pylint: disable=line-too-long

max_pods
int

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

os_type
str or OSType

The operating system type. The default is Linux. Known values are: "Linux" and "Windows".

Default value: Linux
os_sku
str or 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. Known values are: "Ubuntu", "CBLMariner", "Windows2019", and "Windows2022".

max_count
int

The maximum number of nodes for auto-scaling.

min_count
int

The minimum number of nodes for auto-scaling.

enable_auto_scaling

Whether to enable auto-scaler.

scale_down_mode

This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. Known values are: "Delete" and "Deallocate".

type

The type of Agent Pool. Known values are: "VirtualMachineScaleSets" and "AvailabilitySet".

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. Known values are: "System" and "User".

orchestrator_version
str

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.

upgrade_settings

Settings for upgrading the agentpool.

power_state

When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded.

availability_zones

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

enable_node_public_ip

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. # pylint: disable=line-too-long The default is false.

node_public_ip_prefix_id
str

This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. # pylint: disable=line-too-long

scale_set_priority

The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. Known values are: "Spot" and "Regular".

Default value: Regular
scale_set_eviction_policy

This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate".

Default value: Delete
spot_max_price

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.

Default value: -1
tags

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

node_labels

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

node_taints

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

proximity_placement_group_id
str

The ID for Proximity Placement Group.

kubelet_config

The Kubelet configuration on the agent pool nodes.

linux_os_config

The OS configuration of Linux agent nodes.

enable_encryption_at_host

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.

enable_ultra_ssd

Whether to enable UltraSSD.

enable_fips

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

gpu_instance_profile

GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and "MIG7g".

creation_data

CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot.

host_group_id
str

This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. # pylint: disable=line-too-long For more information see Azure dedicated hosts.

name
str

Windows agent pool names must be 6 characters or less. Required.

Variables

Name Description
count
int

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.

vm_size
str

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.

os_disk_size_gb
int

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.

os_disk_type

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. Known values are: "Managed" and "Ephemeral".

kubelet_disk_type

Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary".

workload_runtime

Determines the type of workload a node can run. Known values are: "OCIContainer" and "WasmWasi".

vnet_subnet_id
str

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}. # pylint: disable=line-too-long

pod_subnet_id
str

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}. # pylint: disable=line-too-long

max_pods
int

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

os_type
str or OSType

The operating system type. The default is Linux. Known values are: "Linux" and "Windows".

os_sku
str or 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. Known values are: "Ubuntu", "CBLMariner", "Windows2019", and "Windows2022".

max_count
int

The maximum number of nodes for auto-scaling.

min_count
int

The minimum number of nodes for auto-scaling.

enable_auto_scaling

Whether to enable auto-scaler.

scale_down_mode

This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. Known values are: "Delete" and "Deallocate".

type

The type of Agent Pool. Known values are: "VirtualMachineScaleSets" and "AvailabilitySet".

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. Known values are: "System" and "User".

orchestrator_version
str

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.

current_orchestrator_version
str

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.

node_image_version
str

The version of node image.

upgrade_settings

Settings for upgrading the agentpool.

provisioning_state
str

The current deployment or provisioning state.

power_state

When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded.

availability_zones

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

enable_node_public_ip

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.

node_public_ip_prefix_id
str

This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. # pylint: disable=line-too-long

scale_set_priority

The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. Known values are: "Spot" and "Regular".

scale_set_eviction_policy

This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate".

spot_max_price

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.

tags

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

node_labels

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

node_taints

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

proximity_placement_group_id
str

The ID for Proximity Placement Group.

kubelet_config

The Kubelet configuration on the agent pool nodes.

linux_os_config

The OS configuration of Linux agent nodes.

enable_encryption_at_host

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.

enable_ultra_ssd

Whether to enable UltraSSD.

enable_fips

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

gpu_instance_profile

GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and "MIG7g".

creation_data

CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot.

host_group_id
str

This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. # pylint: disable=line-too-long For more information see Azure dedicated hosts.

name
str

Windows agent pool names must be 6 characters or less. Required.