ManagedClusterAgentPoolProfileProperties Class

  • java.lang.Object
    • com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterAgentPoolProfileProperties

Implements

public class ManagedClusterAgentPoolProfileProperties
implements JsonSerializable<ManagedClusterAgentPoolProfileProperties>

Properties for the container service agent pool profile.

Constructor Summary

Constructor Description
ManagedClusterAgentPoolProfileProperties()

Creates an instance of ManagedClusterAgentPoolProfileProperties class.

Method Summary

Modifier and Type Method and Description
List<String> availabilityZones()

Get the availabilityZones property: The list of Availability zones to use for nodes.

String capacityReservationGroupId()

Get the capacityReservationGroupId property: AKS will associate the specified agent pool with the Capacity Reservation Group.

Integer count()

Get the count property: Number of agents (VMs) to host docker containers.

CreationData creationData()

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

String currentOrchestratorVersion()

Get the currentOrchestratorVersion property: If orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to it.

Boolean enableAutoScaling()

Get the enableAutoScaling property: Whether to enable auto-scaler.

Boolean enableEncryptionAtHost()

Get the enableEncryptionAtHost property: This is only supported on certain VM sizes and in certain Azure regions.

Boolean enableFips()

Get the enableFips property: See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details.

Boolean enableNodePublicIp()

Get the enableNodePublicIp property: Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses.

Boolean enableUltraSsd()

Get the enableUltraSsd property: Whether to enable UltraSSD.

static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonReader)

Reads an instance of ManagedClusterAgentPoolProfileProperties from the JsonReader.

GpuInstanceProfile gpuInstanceProfile()

Get the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.

String hostGroupId()

Get the hostGroupId property: This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}.

KubeletConfig kubeletConfig()

Get the kubeletConfig property: The Kubelet configuration on the agent pool nodes.

KubeletDiskType kubeletDiskType()

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

LinuxOSConfig linuxOSConfig()

Get the linuxOSConfig property: The OS configuration of Linux agent nodes.

Integer maxCount()

Get the maxCount property: The maximum number of nodes for auto-scaling.

Integer maxPods()

Get the maxPods property: The maximum number of pods that can run on a node.

Integer minCount()

Get the minCount property: The minimum number of nodes for auto-scaling.

AgentPoolMode mode()

Get the mode property: A cluster must have at least one 'System' Agent Pool at all times.

AgentPoolNetworkProfile networkProfile()

Get the networkProfile property: Network-related settings of an agent pool.

String nodeImageVersion()

Get the nodeImageVersion property: The version of node image.

Map<String,String> nodeLabels()

Get the nodeLabels property: The node labels to be persisted across all nodes in agent pool.

String nodePublicIpPrefixId()

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

List<String> nodeTaints()

Get the nodeTaints property: The taints added to new nodes during node pool create and scale.

String orchestratorVersion()

Get the orchestratorVersion property: Both patch version <major.minor.patch> (e.g.

Integer osDiskSizeGB()

Get the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool.

OSDiskType osDiskType()

Get the osDiskType property: The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB.

OSSku osSku()

Get the osSku property: Specifies the OS SKU used by the agent pool.

OSType osType()

Get the osType property: OsType to be used to specify os type.

String podSubnetId()

Get the podSubnetId property: If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details).

PowerState powerState()

Get the powerState property: When an Agent Pool is first created it is initially Running.

String provisioningState()

Get the provisioningState property: The current deployment or provisioning state.

String proximityPlacementGroupId()

Get the proximityPlacementGroupId property: The ID for Proximity Placement Group.

ScaleDownMode scaleDownMode()

Get the scaleDownMode property: This also effects the cluster autoscaler behavior.

ScaleSetEvictionPolicy scaleSetEvictionPolicy()

Get the scaleSetEvictionPolicy property: This cannot be specified unless the scaleSetPriority is 'Spot'.

ScaleSetPriority scaleSetPriority()

Get the scaleSetPriority property: The Virtual Machine Scale Set priority.

AgentPoolSecurityProfile securityProfile()

Get the securityProfile property: The security settings of an agent pool.

Float spotMaxPrice()

Get the spotMaxPrice property: Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price.

Map<String,String> tags()

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

JsonWriter toJson(JsonWriter jsonWriter)
AgentPoolType type()

Get the type property: The type of Agent Pool.

AgentPoolUpgradeSettings upgradeSettings()

Get the upgradeSettings property: Settings for upgrading the agentpool.

void validate()

Validates the instance.

String vmSize()

Get the vmSize property: VM size availability varies by region.

String vnetSubnetId()

Get the vnetSubnetId property: If this is not specified, a VNET and subnet will be generated and used.

AgentPoolWindowsProfile windowsProfile()

Get the windowsProfile property: The Windows agent pool's specific profile.

ManagedClusterAgentPoolProfileProperties withAvailabilityZones(List<String> availabilityZones)

Set the availabilityZones property: The list of Availability zones to use for nodes.

ManagedClusterAgentPoolProfileProperties withCapacityReservationGroupId(String capacityReservationGroupId)

Set the capacityReservationGroupId property: AKS will associate the specified agent pool with the Capacity Reservation Group.

ManagedClusterAgentPoolProfileProperties withCount(Integer count)

Set the count property: Number of agents (VMs) to host docker containers.

ManagedClusterAgentPoolProfileProperties withCreationData(CreationData creationData)

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

ManagedClusterAgentPoolProfileProperties withEnableAutoScaling(Boolean enableAutoScaling)

Set the enableAutoScaling property: Whether to enable auto-scaler.

ManagedClusterAgentPoolProfileProperties withEnableEncryptionAtHost(Boolean enableEncryptionAtHost)

Set the enableEncryptionAtHost property: This is only supported on certain VM sizes and in certain Azure regions.

ManagedClusterAgentPoolProfileProperties withEnableFips(Boolean enableFips)

Set the enableFips property: See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details.

ManagedClusterAgentPoolProfileProperties withEnableNodePublicIp(Boolean enableNodePublicIp)

Set the enableNodePublicIp property: Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses.

ManagedClusterAgentPoolProfileProperties withEnableUltraSsd(Boolean enableUltraSsd)

Set the enableUltraSsd property: Whether to enable UltraSSD.

ManagedClusterAgentPoolProfileProperties withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile)

Set the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.

ManagedClusterAgentPoolProfileProperties withHostGroupId(String hostGroupId)

Set the hostGroupId property: This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}.

ManagedClusterAgentPoolProfileProperties withKubeletConfig(KubeletConfig kubeletConfig)

Set the kubeletConfig property: The Kubelet configuration on the agent pool nodes.

ManagedClusterAgentPoolProfileProperties withKubeletDiskType(KubeletDiskType kubeletDiskType)

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

ManagedClusterAgentPoolProfileProperties withLinuxOSConfig(LinuxOSConfig linuxOSConfig)

Set the linuxOSConfig property: The OS configuration of Linux agent nodes.

ManagedClusterAgentPoolProfileProperties withMaxCount(Integer maxCount)

Set the maxCount property: The maximum number of nodes for auto-scaling.

ManagedClusterAgentPoolProfileProperties withMaxPods(Integer maxPods)

Set the maxPods property: The maximum number of pods that can run on a node.

ManagedClusterAgentPoolProfileProperties withMinCount(Integer minCount)

Set the minCount property: The minimum number of nodes for auto-scaling.

ManagedClusterAgentPoolProfileProperties withMode(AgentPoolMode mode)

Set the mode property: A cluster must have at least one 'System' Agent Pool at all times.

ManagedClusterAgentPoolProfileProperties withNetworkProfile(AgentPoolNetworkProfile networkProfile)

Set the networkProfile property: Network-related settings of an agent pool.

ManagedClusterAgentPoolProfileProperties withNodeLabels(Map<String,String> nodeLabels)

Set the nodeLabels property: The node labels to be persisted across all nodes in agent pool.

ManagedClusterAgentPoolProfileProperties withNodePublicIpPrefixId(String nodePublicIpPrefixId)

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

ManagedClusterAgentPoolProfileProperties withNodeTaints(List<String> nodeTaints)

Set the nodeTaints property: The taints added to new nodes during node pool create and scale.

ManagedClusterAgentPoolProfileProperties withOrchestratorVersion(String orchestratorVersion)

Set the orchestratorVersion property: Both patch version <major.minor.patch> (e.g.

ManagedClusterAgentPoolProfileProperties withOsDiskSizeGB(Integer osDiskSizeGB)

Set the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool.

ManagedClusterAgentPoolProfileProperties withOsDiskType(OSDiskType osDiskType)

Set the osDiskType property: The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB.

ManagedClusterAgentPoolProfileProperties withOsSku(OSSku osSku)

Set the osSku property: Specifies the OS SKU used by the agent pool.

ManagedClusterAgentPoolProfileProperties withOsType(OSType osType)

Set the osType property: OsType to be used to specify os type.

ManagedClusterAgentPoolProfileProperties withPodSubnetId(String podSubnetId)

Set the podSubnetId property: If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details).

ManagedClusterAgentPoolProfileProperties withPowerState(PowerState powerState)

Set the powerState property: When an Agent Pool is first created it is initially Running.

ManagedClusterAgentPoolProfileProperties withProximityPlacementGroupId(String proximityPlacementGroupId)

Set the proximityPlacementGroupId property: The ID for Proximity Placement Group.

ManagedClusterAgentPoolProfileProperties withScaleDownMode(ScaleDownMode scaleDownMode)

Set the scaleDownMode property: This also effects the cluster autoscaler behavior.

ManagedClusterAgentPoolProfileProperties withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy)

Set the scaleSetEvictionPolicy property: This cannot be specified unless the scaleSetPriority is 'Spot'.

ManagedClusterAgentPoolProfileProperties withScaleSetPriority(ScaleSetPriority scaleSetPriority)

Set the scaleSetPriority property: The Virtual Machine Scale Set priority.

ManagedClusterAgentPoolProfileProperties withSecurityProfile(AgentPoolSecurityProfile securityProfile)

Set the securityProfile property: The security settings of an agent pool.

ManagedClusterAgentPoolProfileProperties withSpotMaxPrice(Float spotMaxPrice)

Set the spotMaxPrice property: Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price.

ManagedClusterAgentPoolProfileProperties withTags(Map<String,String> tags)

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

ManagedClusterAgentPoolProfileProperties withType(AgentPoolType type)

Set the type property: The type of Agent Pool.

ManagedClusterAgentPoolProfileProperties withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings)

Set the upgradeSettings property: Settings for upgrading the agentpool.

ManagedClusterAgentPoolProfileProperties withVmSize(String vmSize)

Set the vmSize property: VM size availability varies by region.

ManagedClusterAgentPoolProfileProperties withVnetSubnetId(String vnetSubnetId)

Set the vnetSubnetId property: If this is not specified, a VNET and subnet will be generated and used.

ManagedClusterAgentPoolProfileProperties withWindowsProfile(AgentPoolWindowsProfile windowsProfile)

Set the windowsProfile property: The Windows agent pool's specific profile.

ManagedClusterAgentPoolProfileProperties withWorkloadRuntime(WorkloadRuntime workloadRuntime)

Set the workloadRuntime property: Determines the type of workload a node can run.

WorkloadRuntime workloadRuntime()

Get the workloadRuntime property: Determines the type of workload a node can run.

Methods inherited from java.lang.Object

Constructor Details

ManagedClusterAgentPoolProfileProperties

public ManagedClusterAgentPoolProfileProperties()

Creates an instance of ManagedClusterAgentPoolProfileProperties class.

Method Details

availabilityZones

public List availabilityZones()

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

Returns:

the availabilityZones value.

capacityReservationGroupId

public String capacityReservationGroupId()

Get the capacityReservationGroupId property: AKS will associate the specified agent pool with the Capacity Reservation Group.

Returns:

the capacityReservationGroupId value.

count

public Integer count()

Get the count property: 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.

Returns:

the count value.

creationData

public CreationData creationData()

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

Returns:

the creationData value.

currentOrchestratorVersion

public String currentOrchestratorVersion()

Get the currentOrchestratorVersion property: 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.

Returns:

the currentOrchestratorVersion value.

enableAutoScaling

public Boolean enableAutoScaling()

Get the enableAutoScaling property: Whether to enable auto-scaler.

Returns:

the enableAutoScaling value.

enableEncryptionAtHost

public Boolean enableEncryptionAtHost()

Get the enableEncryptionAtHost property: 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.

Returns:

the enableEncryptionAtHost value.

enableFips

public Boolean enableFips()

Get the enableFips property: See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools\#add-a-fips-enabled-node-pool-preview) for more details.

Returns:

the enableFips value.

enableNodePublicIp

public Boolean enableNodePublicIp()

Get the enableNodePublicIp property: 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](https://docs.microsoft.com/azure/aks/use-multiple-node-pools\#assign-a-public-ip-per-node-for-your-node-pools). The default is false.

Returns:

the enableNodePublicIp value.

enableUltraSsd

public Boolean enableUltraSsd()

Get the enableUltraSsd property: Whether to enable UltraSSD.

Returns:

the enableUltraSsd value.

fromJson

public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonReader)

Reads an instance of ManagedClusterAgentPoolProfileProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ManagedClusterAgentPoolProfileProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the ManagedClusterAgentPoolProfileProperties.

gpuInstanceProfile

public GpuInstanceProfile gpuInstanceProfile()

Get the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.

Returns:

the gpuInstanceProfile value.

hostGroupId

public String hostGroupId()

Get the hostGroupId property: This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts).

Returns:

the hostGroupId value.

kubeletConfig

public KubeletConfig kubeletConfig()

Get the kubeletConfig property: The Kubelet configuration on the agent pool nodes.

Returns:

the kubeletConfig value.

kubeletDiskType

public KubeletDiskType kubeletDiskType()

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

Returns:

the kubeletDiskType value.

linuxOSConfig

public LinuxOSConfig linuxOSConfig()

Get the linuxOSConfig property: The OS configuration of Linux agent nodes.

Returns:

the linuxOSConfig value.

maxCount

public Integer maxCount()

Get the maxCount property: The maximum number of nodes for auto-scaling.

Returns:

the maxCount value.

maxPods

public Integer maxPods()

Get the maxPods property: The maximum number of pods that can run on a node.

Returns:

the maxPods value.

minCount

public Integer minCount()

Get the minCount property: The minimum number of nodes for auto-scaling.

Returns:

the minCount value.

mode

public AgentPoolMode mode()

Get the mode property: 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.

Returns:

the mode value.

networkProfile

public AgentPoolNetworkProfile networkProfile()

Get the networkProfile property: Network-related settings of an agent pool.

Returns:

the networkProfile value.

nodeImageVersion

public String nodeImageVersion()

Get the nodeImageVersion property: The version of node image.

Returns:

the nodeImageVersion value.

nodeLabels

public Map nodeLabels()

Get the nodeLabels property: The node labels to be persisted across all nodes in agent pool.

Returns:

the nodeLabels value.

nodePublicIpPrefixId

public String nodePublicIpPrefixId()

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

Returns:

the nodePublicIpPrefixId value.

nodeTaints

public List nodeTaints()

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

Returns:

the nodeTaints value.

orchestratorVersion

public String orchestratorVersion()

Get the orchestratorVersion property: 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](https://docs.microsoft.com/azure/aks/use-multiple-node-pools\#upgrade-a-node-pool).

Returns:

the orchestratorVersion value.

osDiskSizeGB

public Integer osDiskSizeGB()

Get the osDiskSizeGB property: 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.

Returns:

the osDiskSizeGB value.

osDiskType

public OSDiskType osDiskType()

Get the osDiskType property: 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](https://docs.microsoft.com/azure/aks/cluster-configuration\#ephemeral-os).

Returns:

the osDiskType value.

osSku

public OSSku osSku()

Get the osSku property: 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.

Returns:

the osSku value.

osType

public OSType osType()

Get the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux.

Returns:

the osType value.

podSubnetId

public String podSubnetId()

Get the podSubnetId property: 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}.

Returns:

the podSubnetId value.

powerState

public PowerState powerState()

Get the powerState property: 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.

Returns:

the powerState value.

provisioningState

public String provisioningState()

Get the provisioningState property: The current deployment or provisioning state.

Returns:

the provisioningState value.

proximityPlacementGroupId

public String proximityPlacementGroupId()

Get the proximityPlacementGroupId property: The ID for Proximity Placement Group.

Returns:

the proximityPlacementGroupId value.

scaleDownMode

public ScaleDownMode scaleDownMode()

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

Returns:

the scaleDownMode value.

scaleSetEvictionPolicy

public ScaleSetEvictionPolicy scaleSetEvictionPolicy()

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

Returns:

the scaleSetEvictionPolicy value.

scaleSetPriority

public ScaleSetPriority scaleSetPriority()

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

Returns:

the scaleSetPriority value.

securityProfile

public AgentPoolSecurityProfile securityProfile()

Get the securityProfile property: The security settings of an agent pool.

Returns:

the securityProfile value.

spotMaxPrice

public Float spotMaxPrice()

Get the spotMaxPrice property: 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](https://docs.microsoft.com/azure/virtual-machines/spot-vms\#pricing).

Returns:

the spotMaxPrice value.

tags

public Map tags()

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

Returns:

the tags value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public AgentPoolType type()

Get the type property: The type of Agent Pool.

Returns:

the type value.

upgradeSettings

public AgentPoolUpgradeSettings upgradeSettings()

Get the upgradeSettings property: Settings for upgrading the agentpool.

Returns:

the upgradeSettings value.

validate

public void validate()

Validates the instance.

vmSize

public String vmSize()

Get the vmSize property: 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.

Returns:

the vmSize value.

vnetSubnetId

public String vnetSubnetId()

Get the vnetSubnetId property: 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}.

Returns:

the vnetSubnetId value.

windowsProfile

public AgentPoolWindowsProfile windowsProfile()

Get the windowsProfile property: The Windows agent pool's specific profile.

Returns:

the windowsProfile value.

withAvailabilityZones

public ManagedClusterAgentPoolProfileProperties withAvailabilityZones(List availabilityZones)

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

Parameters:

availabilityZones - the availabilityZones value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withCapacityReservationGroupId

public ManagedClusterAgentPoolProfileProperties withCapacityReservationGroupId(String capacityReservationGroupId)

Set the capacityReservationGroupId property: AKS will associate the specified agent pool with the Capacity Reservation Group.

Parameters:

capacityReservationGroupId - the capacityReservationGroupId value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withCount

public ManagedClusterAgentPoolProfileProperties withCount(Integer count)

Set the count property: 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.

Parameters:

count - the count value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withCreationData

public ManagedClusterAgentPoolProfileProperties withCreationData(CreationData creationData)

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

Parameters:

creationData - the creationData value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withEnableAutoScaling

public ManagedClusterAgentPoolProfileProperties withEnableAutoScaling(Boolean enableAutoScaling)

Set the enableAutoScaling property: Whether to enable auto-scaler.

Parameters:

enableAutoScaling - the enableAutoScaling value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withEnableEncryptionAtHost

public ManagedClusterAgentPoolProfileProperties withEnableEncryptionAtHost(Boolean enableEncryptionAtHost)

Set the enableEncryptionAtHost property: 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.

Parameters:

enableEncryptionAtHost - the enableEncryptionAtHost value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withEnableFips

public ManagedClusterAgentPoolProfileProperties withEnableFips(Boolean enableFips)

Set the enableFips property: See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools\#add-a-fips-enabled-node-pool-preview) for more details.

Parameters:

enableFips - the enableFips value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withEnableNodePublicIp

public ManagedClusterAgentPoolProfileProperties withEnableNodePublicIp(Boolean enableNodePublicIp)

Set the enableNodePublicIp property: 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](https://docs.microsoft.com/azure/aks/use-multiple-node-pools\#assign-a-public-ip-per-node-for-your-node-pools). The default is false.

Parameters:

enableNodePublicIp - the enableNodePublicIp value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withEnableUltraSsd

public ManagedClusterAgentPoolProfileProperties withEnableUltraSsd(Boolean enableUltraSsd)

Set the enableUltraSsd property: Whether to enable UltraSSD.

Parameters:

enableUltraSsd - the enableUltraSsd value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withGpuInstanceProfile

public ManagedClusterAgentPoolProfileProperties withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile)

Set the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.

Parameters:

gpuInstanceProfile - the gpuInstanceProfile value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withHostGroupId

public ManagedClusterAgentPoolProfileProperties withHostGroupId(String hostGroupId)

Set the hostGroupId property: This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts).

Parameters:

hostGroupId - the hostGroupId value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withKubeletConfig

public ManagedClusterAgentPoolProfileProperties withKubeletConfig(KubeletConfig kubeletConfig)

Set the kubeletConfig property: The Kubelet configuration on the agent pool nodes.

Parameters:

kubeletConfig - the kubeletConfig value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withKubeletDiskType

public ManagedClusterAgentPoolProfileProperties withKubeletDiskType(KubeletDiskType kubeletDiskType)

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

Parameters:

kubeletDiskType - the kubeletDiskType value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withLinuxOSConfig

public ManagedClusterAgentPoolProfileProperties withLinuxOSConfig(LinuxOSConfig linuxOSConfig)

Set the linuxOSConfig property: The OS configuration of Linux agent nodes.

Parameters:

linuxOSConfig - the linuxOSConfig value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withMaxCount

public ManagedClusterAgentPoolProfileProperties withMaxCount(Integer maxCount)

Set the maxCount property: The maximum number of nodes for auto-scaling.

Parameters:

maxCount - the maxCount value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withMaxPods

public ManagedClusterAgentPoolProfileProperties withMaxPods(Integer maxPods)

Set the maxPods property: The maximum number of pods that can run on a node.

Parameters:

maxPods - the maxPods value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withMinCount

public ManagedClusterAgentPoolProfileProperties withMinCount(Integer minCount)

Set the minCount property: The minimum number of nodes for auto-scaling.

Parameters:

minCount - the minCount value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withMode

public ManagedClusterAgentPoolProfileProperties withMode(AgentPoolMode mode)

Set the mode property: 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.

Parameters:

mode - the mode value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withNetworkProfile

public ManagedClusterAgentPoolProfileProperties withNetworkProfile(AgentPoolNetworkProfile networkProfile)

Set the networkProfile property: Network-related settings of an agent pool.

Parameters:

networkProfile - the networkProfile value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withNodeLabels

public ManagedClusterAgentPoolProfileProperties withNodeLabels(Map nodeLabels)

Set the nodeLabels property: The node labels to be persisted across all nodes in agent pool.

Parameters:

nodeLabels - the nodeLabels value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withNodePublicIpPrefixId

public ManagedClusterAgentPoolProfileProperties withNodePublicIpPrefixId(String nodePublicIpPrefixId)

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

Parameters:

nodePublicIpPrefixId - the nodePublicIpPrefixId value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withNodeTaints

public ManagedClusterAgentPoolProfileProperties withNodeTaints(List nodeTaints)

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

Parameters:

nodeTaints - the nodeTaints value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withOrchestratorVersion

public ManagedClusterAgentPoolProfileProperties withOrchestratorVersion(String orchestratorVersion)

Set the orchestratorVersion property: 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](https://docs.microsoft.com/azure/aks/use-multiple-node-pools\#upgrade-a-node-pool).

Parameters:

orchestratorVersion - the orchestratorVersion value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withOsDiskSizeGB

public ManagedClusterAgentPoolProfileProperties withOsDiskSizeGB(Integer osDiskSizeGB)

Set the osDiskSizeGB property: 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.

Parameters:

osDiskSizeGB - the osDiskSizeGB value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withOsDiskType

public ManagedClusterAgentPoolProfileProperties withOsDiskType(OSDiskType osDiskType)

Set the osDiskType property: 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](https://docs.microsoft.com/azure/aks/cluster-configuration\#ephemeral-os).

Parameters:

osDiskType - the osDiskType value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withOsSku

public ManagedClusterAgentPoolProfileProperties withOsSku(OSSku osSku)

Set the osSku property: 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.

Parameters:

osSku - the osSku value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withOsType

public ManagedClusterAgentPoolProfileProperties withOsType(OSType osType)

Set the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux.

Parameters:

osType - the osType value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withPodSubnetId

public ManagedClusterAgentPoolProfileProperties withPodSubnetId(String podSubnetId)

Set the podSubnetId property: 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}.

Parameters:

podSubnetId - the podSubnetId value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withPowerState

public ManagedClusterAgentPoolProfileProperties withPowerState(PowerState powerState)

Set the powerState property: 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.

Parameters:

powerState - the powerState value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withProximityPlacementGroupId

public ManagedClusterAgentPoolProfileProperties withProximityPlacementGroupId(String proximityPlacementGroupId)

Set the proximityPlacementGroupId property: The ID for Proximity Placement Group.

Parameters:

proximityPlacementGroupId - the proximityPlacementGroupId value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withScaleDownMode

public ManagedClusterAgentPoolProfileProperties withScaleDownMode(ScaleDownMode scaleDownMode)

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

Parameters:

scaleDownMode - the scaleDownMode value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withScaleSetEvictionPolicy

public ManagedClusterAgentPoolProfileProperties withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy)

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

Parameters:

scaleSetEvictionPolicy - the scaleSetEvictionPolicy value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withScaleSetPriority

public ManagedClusterAgentPoolProfileProperties withScaleSetPriority(ScaleSetPriority scaleSetPriority)

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

Parameters:

scaleSetPriority - the scaleSetPriority value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withSecurityProfile

public ManagedClusterAgentPoolProfileProperties withSecurityProfile(AgentPoolSecurityProfile securityProfile)

Set the securityProfile property: The security settings of an agent pool.

Parameters:

securityProfile - the securityProfile value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withSpotMaxPrice

public ManagedClusterAgentPoolProfileProperties withSpotMaxPrice(Float spotMaxPrice)

Set the spotMaxPrice property: 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](https://docs.microsoft.com/azure/virtual-machines/spot-vms\#pricing).

Parameters:

spotMaxPrice - the spotMaxPrice value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withTags

public ManagedClusterAgentPoolProfileProperties withTags(Map tags)

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

Parameters:

tags - the tags value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withType

public ManagedClusterAgentPoolProfileProperties withType(AgentPoolType type)

Set the type property: The type of Agent Pool.

Parameters:

type - the type value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withUpgradeSettings

public ManagedClusterAgentPoolProfileProperties withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings)

Set the upgradeSettings property: Settings for upgrading the agentpool.

Parameters:

upgradeSettings - the upgradeSettings value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withVmSize

public ManagedClusterAgentPoolProfileProperties withVmSize(String vmSize)

Set the vmSize property: 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.

Parameters:

vmSize - the vmSize value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withVnetSubnetId

public ManagedClusterAgentPoolProfileProperties withVnetSubnetId(String vnetSubnetId)

Set the vnetSubnetId property: 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}.

Parameters:

vnetSubnetId - the vnetSubnetId value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withWindowsProfile

public ManagedClusterAgentPoolProfileProperties withWindowsProfile(AgentPoolWindowsProfile windowsProfile)

Set the windowsProfile property: The Windows agent pool's specific profile.

Parameters:

windowsProfile - the windowsProfile value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

withWorkloadRuntime

public ManagedClusterAgentPoolProfileProperties withWorkloadRuntime(WorkloadRuntime workloadRuntime)

Set the workloadRuntime property: Determines the type of workload a node can run.

Parameters:

workloadRuntime - the workloadRuntime value to set.

Returns:

the ManagedClusterAgentPoolProfileProperties object itself.

workloadRuntime

public WorkloadRuntime workloadRuntime()

Get the workloadRuntime property: Determines the type of workload a node can run.

Returns:

the workloadRuntime value.

Applies to