ManagedClusterAgentPoolProfile Class
- java.
lang. Object - com.
azure. resourcemanager. containerservice. fluent. models. ManagedClusterAgentPoolProfileProperties - com.
azure. resourcemanager. containerservice. models. ManagedClusterAgentPoolProfile
- com.
- com.
public final class ManagedClusterAgentPoolProfile
extends ManagedClusterAgentPoolProfileProperties
Profile for the container service agent pool.
Constructor Summary
Constructor | Description |
---|---|
ManagedClusterAgentPoolProfile() |
Creates an instance of Managed |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
currentOrchestratorVersion()
Get the current |
static
Managed |
fromJson(JsonReader jsonReader)
Reads an instance of Managed |
String |
name()
Get the name property: Windows agent pool names must be 6 characters or less. |
String |
nodeImageVersion()
Get the node |
String |
provisioningState()
Get the provisioning |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Managed |
withAvailabilityZones(List<String> availabilityZones)
Set the availability |
Managed |
withCapacityReservationGroupId(String capacityReservationGroupId)
Set the capacity |
Managed |
withCount(Integer count)
Set the count property: Number of agents (VMs) to host docker containers. |
Managed |
withCreationData(CreationData creationData)
Set the creation |
Managed |
withEnableAutoScaling(Boolean enableAutoScaling)
Set the enable |
Managed |
withEnableEncryptionAtHost(Boolean enableEncryptionAtHost)
Set the enable |
Managed |
withEnableFips(Boolean enableFips)
Set the enable |
Managed |
withEnableNodePublicIp(Boolean enableNodePublicIp)
Set the enable |
Managed |
withEnableUltraSsd(Boolean enableUltraSsd)
Set the enable |
Managed |
withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile)
Set the gpu |
Managed |
withHostGroupId(String hostGroupId)
Set the host |
Managed |
withKubeletConfig(KubeletConfig kubeletConfig)
Set the kubelet |
Managed |
withKubeletDiskType(KubeletDiskType kubeletDiskType)
Set the kubelet |
Managed |
withLinuxOSConfig(LinuxOSConfig linuxOSConfig)
Set the linux |
Managed |
withMaxCount(Integer maxCount)
Set the max |
Managed |
withMaxPods(Integer maxPods)
Set the max |
Managed |
withMinCount(Integer minCount)
Set the min |
Managed |
withMode(AgentPoolMode mode)
Set the mode property: A cluster must have at least one 'System' Agent Pool at all times. |
Managed |
withName(String name)
Set the name property: Windows agent pool names must be 6 characters or less. |
Managed |
withNetworkProfile(AgentPoolNetworkProfile networkProfile)
Set the network |
Managed |
withNodeLabels(Map<String,String> nodeLabels)
Set the node |
Managed |
withNodePublicIpPrefixId(String nodePublicIpPrefixId)
Set the node |
Managed |
withNodeTaints(List<String> nodeTaints)
Set the node |
Managed |
withOrchestratorVersion(String orchestratorVersion)
Set the orchestrator |
Managed |
withOsDiskSizeGB(Integer osDiskSizeGB)
Set the os |
Managed |
withOsDiskType(OSDiskType osDiskType)
Set the os |
Managed |
withOsSku(OSSku osSku)
Set the os |
Managed |
withOsType(OSType osType)
Set the os |
Managed |
withPodSubnetId(String podSubnetId)
Set the pod |
Managed |
withPowerState(PowerState powerState)
Set the power |
Managed |
withProximityPlacementGroupId(String proximityPlacementGroupId)
Set the proximity |
Managed |
withScaleDownMode(ScaleDownMode scaleDownMode)
Set the scale |
Managed |
withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy)
Set the scale |
Managed |
withScaleSetPriority(ScaleSetPriority scaleSetPriority)
Set the scale |
Managed |
withSecurityProfile(AgentPoolSecurityProfile securityProfile)
Set the security |
Managed |
withSpotMaxPrice(Float spotMaxPrice)
Set the spot |
Managed |
withTags(Map<String,String> tags)
Set the tags property: The tags to be persisted on the agent pool virtual machine scale set. |
Managed |
withType(AgentPoolType type)
Set the type property: The type of Agent Pool. |
Managed |
withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings)
Set the upgrade |
Managed |
withVmSize(String vmSize)
Set the vm |
Managed |
withVnetSubnetId(String vnetSubnetId)
Set the vnet |
Managed |
withWindowsProfile(AgentPoolWindowsProfile windowsProfile)
Set the windows |
Managed |
withWorkloadRuntime(WorkloadRuntime workloadRuntime)
Set the workload |
Methods inherited from ManagedClusterAgentPoolProfileProperties
Methods inherited from java.lang.Object
Constructor Details
ManagedClusterAgentPoolProfile
public ManagedClusterAgentPoolProfile()
Creates an instance of ManagedClusterAgentPoolProfile class.
Method Details
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.
Overrides:
ManagedClusterAgentPoolProfile.currentOrchestratorVersion()Returns:
fromJson
public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader)
Reads an instance of ManagedClusterAgentPoolProfile from the JsonReader.
Parameters:
Returns:
Throws:
name
public String name()
Get the name property: Windows agent pool names must be 6 characters or less.
Returns:
nodeImageVersion
public String nodeImageVersion()
Get the nodeImageVersion property: The version of node image.
Overrides:
ManagedClusterAgentPoolProfile.nodeImageVersion()Returns:
provisioningState
public String provisioningState()
Get the provisioningState property: The current deployment or provisioning state.
Overrides:
ManagedClusterAgentPoolProfile.provisioningState()Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
ManagedClusterAgentPoolProfile.toJson(JsonWriter jsonWriter)Parameters:
Throws:
validate
public void validate()
Validates the instance.
Overrides:
ManagedClusterAgentPoolProfile.validate()withAvailabilityZones
public ManagedClusterAgentPoolProfile withAvailabilityZones(List
Set the availabilityZones property: The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'.
Overrides:
ManagedClusterAgentPoolProfile.withAvailabilityZones(List<String> availabilityZones)Parameters:
withCapacityReservationGroupId
public ManagedClusterAgentPoolProfile withCapacityReservationGroupId(String capacityReservationGroupId)
Set the capacityReservationGroupId property: AKS will associate the specified agent pool with the Capacity Reservation Group.
Overrides:
ManagedClusterAgentPoolProfile.withCapacityReservationGroupId(String capacityReservationGroupId)Parameters:
withCount
public ManagedClusterAgentPoolProfile 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.
Overrides:
ManagedClusterAgentPoolProfile.withCount(Integer count)Parameters:
withCreationData
public ManagedClusterAgentPoolProfile 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.
Overrides:
ManagedClusterAgentPoolProfile.withCreationData(CreationData creationData)Parameters:
withEnableAutoScaling
public ManagedClusterAgentPoolProfile withEnableAutoScaling(Boolean enableAutoScaling)
Set the enableAutoScaling property: Whether to enable auto-scaler.
Overrides:
ManagedClusterAgentPoolProfile.withEnableAutoScaling(Boolean enableAutoScaling)Parameters:
withEnableEncryptionAtHost
public ManagedClusterAgentPoolProfile 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.
Overrides:
ManagedClusterAgentPoolProfile.withEnableEncryptionAtHost(Boolean enableEncryptionAtHost)Parameters:
withEnableFips
public ManagedClusterAgentPoolProfile 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.
Overrides:
ManagedClusterAgentPoolProfile.withEnableFips(Boolean enableFips)Parameters:
withEnableNodePublicIp
public ManagedClusterAgentPoolProfile 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.
Overrides:
ManagedClusterAgentPoolProfile.withEnableNodePublicIp(Boolean enableNodePublicIp)Parameters:
withEnableUltraSsd
public ManagedClusterAgentPoolProfile withEnableUltraSsd(Boolean enableUltraSsd)
Set the enableUltraSsd property: Whether to enable UltraSSD.
Overrides:
ManagedClusterAgentPoolProfile.withEnableUltraSsd(Boolean enableUltraSsd)Parameters:
withGpuInstanceProfile
public ManagedClusterAgentPoolProfile withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile)
Set the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.
Overrides:
ManagedClusterAgentPoolProfile.withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile)Parameters:
withHostGroupId
public ManagedClusterAgentPoolProfile 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).
Overrides:
ManagedClusterAgentPoolProfile.withHostGroupId(String hostGroupId)Parameters:
withKubeletConfig
public ManagedClusterAgentPoolProfile withKubeletConfig(KubeletConfig kubeletConfig)
Set the kubeletConfig property: The Kubelet configuration on the agent pool nodes.
Overrides:
ManagedClusterAgentPoolProfile.withKubeletConfig(KubeletConfig kubeletConfig)Parameters:
withKubeletDiskType
public ManagedClusterAgentPoolProfile withKubeletDiskType(KubeletDiskType kubeletDiskType)
Set the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.
Overrides:
ManagedClusterAgentPoolProfile.withKubeletDiskType(KubeletDiskType kubeletDiskType)Parameters:
withLinuxOSConfig
public ManagedClusterAgentPoolProfile withLinuxOSConfig(LinuxOSConfig linuxOSConfig)
Set the linuxOSConfig property: The OS configuration of Linux agent nodes.
Overrides:
ManagedClusterAgentPoolProfile.withLinuxOSConfig(LinuxOSConfig linuxOSConfig)Parameters:
withMaxCount
public ManagedClusterAgentPoolProfile withMaxCount(Integer maxCount)
Set the maxCount property: The maximum number of nodes for auto-scaling.
Overrides:
ManagedClusterAgentPoolProfile.withMaxCount(Integer maxCount)Parameters:
withMaxPods
public ManagedClusterAgentPoolProfile withMaxPods(Integer maxPods)
Set the maxPods property: The maximum number of pods that can run on a node.
Overrides:
ManagedClusterAgentPoolProfile.withMaxPods(Integer maxPods)Parameters:
withMinCount
public ManagedClusterAgentPoolProfile withMinCount(Integer minCount)
Set the minCount property: The minimum number of nodes for auto-scaling.
Overrides:
ManagedClusterAgentPoolProfile.withMinCount(Integer minCount)Parameters:
withMode
public ManagedClusterAgentPoolProfile 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.
Overrides:
ManagedClusterAgentPoolProfile.withMode(AgentPoolMode mode)Parameters:
withName
public ManagedClusterAgentPoolProfile withName(String name)
Set the name property: Windows agent pool names must be 6 characters or less.
Parameters:
Returns:
withNetworkProfile
public ManagedClusterAgentPoolProfile withNetworkProfile(AgentPoolNetworkProfile networkProfile)
Set the networkProfile property: Network-related settings of an agent pool.
Overrides:
ManagedClusterAgentPoolProfile.withNetworkProfile(AgentPoolNetworkProfile networkProfile)Parameters:
withNodeLabels
public ManagedClusterAgentPoolProfile withNodeLabels(Map
Set the nodeLabels property: The node labels to be persisted across all nodes in agent pool.
Overrides:
ManagedClusterAgentPoolProfile.withNodeLabels(Map<String,String> nodeLabels)Parameters:
withNodePublicIpPrefixId
public ManagedClusterAgentPoolProfile withNodePublicIpPrefixId(String nodePublicIpPrefixId)
Set the nodePublicIpPrefixId property: This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}.
Overrides:
ManagedClusterAgentPoolProfile.withNodePublicIpPrefixId(String nodePublicIpPrefixId)Parameters:
withNodeTaints
public ManagedClusterAgentPoolProfile withNodeTaints(List
Set the nodeTaints property: The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
Overrides:
ManagedClusterAgentPoolProfile.withNodeTaints(List<String> nodeTaints)Parameters:
withOrchestratorVersion
public ManagedClusterAgentPoolProfile 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).
Overrides:
ManagedClusterAgentPoolProfile.withOrchestratorVersion(String orchestratorVersion)Parameters:
withOsDiskSizeGB
public ManagedClusterAgentPoolProfile 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.
Overrides:
ManagedClusterAgentPoolProfile.withOsDiskSizeGB(Integer osDiskSizeGB)Parameters:
withOsDiskType
public ManagedClusterAgentPoolProfile 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).
Overrides:
ManagedClusterAgentPoolProfile.withOsDiskType(OSDiskType osDiskType)Parameters:
withOsSku
public ManagedClusterAgentPoolProfile 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.
Overrides:
ManagedClusterAgentPoolProfile.withOsSku(OSSku osSku)Parameters:
withOsType
public ManagedClusterAgentPoolProfile withOsType(OSType osType)
Set the osType property: OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux.
Overrides:
ManagedClusterAgentPoolProfile.withOsType(OSType osType)Parameters:
withPodSubnetId
public ManagedClusterAgentPoolProfile 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}.
Overrides:
ManagedClusterAgentPoolProfile.withPodSubnetId(String podSubnetId)Parameters:
withPowerState
public ManagedClusterAgentPoolProfile 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.
Overrides:
ManagedClusterAgentPoolProfile.withPowerState(PowerState powerState)Parameters:
withProximityPlacementGroupId
public ManagedClusterAgentPoolProfile withProximityPlacementGroupId(String proximityPlacementGroupId)
Set the proximityPlacementGroupId property: The ID for Proximity Placement Group.
Overrides:
ManagedClusterAgentPoolProfile.withProximityPlacementGroupId(String proximityPlacementGroupId)Parameters:
withScaleDownMode
public ManagedClusterAgentPoolProfile withScaleDownMode(ScaleDownMode scaleDownMode)
Set the scaleDownMode property: This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.
Overrides:
ManagedClusterAgentPoolProfile.withScaleDownMode(ScaleDownMode scaleDownMode)Parameters:
withScaleSetEvictionPolicy
public ManagedClusterAgentPoolProfile withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy)
Set the scaleSetEvictionPolicy property: This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'.
Overrides:
ManagedClusterAgentPoolProfile.withScaleSetEvictionPolicy(ScaleSetEvictionPolicy scaleSetEvictionPolicy)Parameters:
withScaleSetPriority
public ManagedClusterAgentPoolProfile withScaleSetPriority(ScaleSetPriority scaleSetPriority)
Set the scaleSetPriority property: The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.
Overrides:
ManagedClusterAgentPoolProfile.withScaleSetPriority(ScaleSetPriority scaleSetPriority)Parameters:
withSecurityProfile
public ManagedClusterAgentPoolProfile withSecurityProfile(AgentPoolSecurityProfile securityProfile)
Set the securityProfile property: The security settings of an agent pool.
Overrides:
ManagedClusterAgentPoolProfile.withSecurityProfile(AgentPoolSecurityProfile securityProfile)Parameters:
withSpotMaxPrice
public ManagedClusterAgentPoolProfile 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).
Overrides:
ManagedClusterAgentPoolProfile.withSpotMaxPrice(Float spotMaxPrice)Parameters:
withTags
public ManagedClusterAgentPoolProfile withTags(Map
Set the tags property: The tags to be persisted on the agent pool virtual machine scale set.
Overrides:
ManagedClusterAgentPoolProfile.withTags(Map<String,String> tags)Parameters:
withType
public ManagedClusterAgentPoolProfile withType(AgentPoolType type)
Set the type property: The type of Agent Pool.
Overrides:
ManagedClusterAgentPoolProfile.withType(AgentPoolType type)Parameters:
withUpgradeSettings
public ManagedClusterAgentPoolProfile withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings)
Set the upgradeSettings property: Settings for upgrading the agentpool.
Overrides:
ManagedClusterAgentPoolProfile.withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettings)Parameters:
withVmSize
public ManagedClusterAgentPoolProfile 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.
Overrides:
ManagedClusterAgentPoolProfile.withVmSize(String vmSize)Parameters:
withVnetSubnetId
public ManagedClusterAgentPoolProfile 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}.
Overrides:
ManagedClusterAgentPoolProfile.withVnetSubnetId(String vnetSubnetId)Parameters:
withWindowsProfile
public ManagedClusterAgentPoolProfile withWindowsProfile(AgentPoolWindowsProfile windowsProfile)
Set the windowsProfile property: The Windows agent pool's specific profile.
Overrides:
ManagedClusterAgentPoolProfile.withWindowsProfile(AgentPoolWindowsProfile windowsProfile)Parameters:
withWorkloadRuntime
public ManagedClusterAgentPoolProfile withWorkloadRuntime(WorkloadRuntime workloadRuntime)
Set the workloadRuntime property: Determines the type of workload a node can run.
Overrides:
ManagedClusterAgentPoolProfile.withWorkloadRuntime(WorkloadRuntime workloadRuntime)Parameters:
Applies to
Azure SDK for Java