Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Update-AzAksNodePool

Module:
Az.Aks Module

Update node pool in a managed cluster.

Syntax

defaultParameterSet (Default)

Update-AzAksNodePool
 -ResourceGroupName <String>
 -ClusterName <String>
 -Name <String>
 [-NodeCount <Int32>]
 [-NodeImageOnly]
 [-AsJob]
 [-Force]
 [-KubernetesVersion <String>]
 [-MinCount <Int32>]
 [-MaxCount <Int32>]
 [-EnableAutoScaling]
 [-Mode <String>]
 [-NodeLabel <Hashtable>]
 [-Tag <Hashtable>]
 [-NodeTaint <String[]>]
 [-AksCustomHeader <Hashtable>]
 [-IfMatch <String>]
 [-IfNoneMatch <String>]
 [-NetworkProfile <AgentPoolNetworkProfile>]
 [-ScaleDownMode <String>]
 [-EnableSecureBoot]
 [-EnableVtpm]
 [-SshAccess <String>]
 [-MaxSurge <String>]
 [-MaxUnavailable <String>]
 [-DrainTimeoutInMinute <Int32>]
 [-NodeSoakDurationInMinute <Int32>]
 [-UndrainableNodeBehavior <String>]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [-SubscriptionId <String>]
 [<CommonParameters>]

ParentObjectParameterSet

Update-AzAksNodePool
 -Name <String>
 -ClusterObject <PSKubernetesCluster>
 [-NodeCount <Int32>]
 [-NodeImageOnly]
 [-AsJob]
 [-Force]
 [-KubernetesVersion <String>]
 [-MinCount <Int32>]
 [-MaxCount <Int32>]
 [-EnableAutoScaling]
 [-Mode <String>]
 [-NodeLabel <Hashtable>]
 [-Tag <Hashtable>]
 [-NodeTaint <String[]>]
 [-AksCustomHeader <Hashtable>]
 [-IfMatch <String>]
 [-IfNoneMatch <String>]
 [-NetworkProfile <AgentPoolNetworkProfile>]
 [-ScaleDownMode <String>]
 [-EnableSecureBoot]
 [-EnableVtpm]
 [-SshAccess <String>]
 [-MaxSurge <String>]
 [-MaxUnavailable <String>]
 [-DrainTimeoutInMinute <Int32>]
 [-NodeSoakDurationInMinute <Int32>]
 [-UndrainableNodeBehavior <String>]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [-SubscriptionId <String>]
 [<CommonParameters>]

InputObjectParameterSet

Update-AzAksNodePool
 -InputObject <PSNodePool>
 [-NodeCount <Int32>]
 [-NodeImageOnly]
 [-AsJob]
 [-Force]
 [-KubernetesVersion <String>]
 [-MinCount <Int32>]
 [-MaxCount <Int32>]
 [-EnableAutoScaling]
 [-Mode <String>]
 [-NodeLabel <Hashtable>]
 [-Tag <Hashtable>]
 [-NodeTaint <String[]>]
 [-AksCustomHeader <Hashtable>]
 [-IfMatch <String>]
 [-IfNoneMatch <String>]
 [-NetworkProfile <AgentPoolNetworkProfile>]
 [-ScaleDownMode <String>]
 [-EnableSecureBoot]
 [-EnableVtpm]
 [-SshAccess <String>]
 [-MaxSurge <String>]
 [-MaxUnavailable <String>]
 [-DrainTimeoutInMinute <Int32>]
 [-NodeSoakDurationInMinute <Int32>]
 [-UndrainableNodeBehavior <String>]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [-SubscriptionId <String>]
 [<CommonParameters>]

IdParameterSet

Update-AzAksNodePool
 -Id <String>
 [-NodeCount <Int32>]
 [-NodeImageOnly]
 [-AsJob]
 [-Force]
 [-KubernetesVersion <String>]
 [-MinCount <Int32>]
 [-MaxCount <Int32>]
 [-EnableAutoScaling]
 [-Mode <String>]
 [-NodeLabel <Hashtable>]
 [-Tag <Hashtable>]
 [-NodeTaint <String[]>]
 [-AksCustomHeader <Hashtable>]
 [-IfMatch <String>]
 [-IfNoneMatch <String>]
 [-NetworkProfile <AgentPoolNetworkProfile>]
 [-ScaleDownMode <String>]
 [-EnableSecureBoot]
 [-EnableVtpm]
 [-SshAccess <String>]
 [-MaxSurge <String>]
 [-MaxUnavailable <String>]
 [-DrainTimeoutInMinute <Int32>]
 [-NodeSoakDurationInMinute <Int32>]
 [-UndrainableNodeBehavior <String>]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [-SubscriptionId <String>]
 [<CommonParameters>]

Description

Update node pool in a managed cluster.

Examples

Example 1: Change minimum count to 5 for specified node pool

Update-AzAksNodePool -ResourceGroupName myResourceGroup -ClusterName myCluster -Name linuxpool -MinCount 5

Parameters

-AksCustomHeader

Aks custom headers

Parameter properties

Type:Hashtable
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-AsJob

Run cmdlet in the background

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ClusterName

The name of the managed cluster resource.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ClusterObject

The cluster object

Parameter properties

Type:PSKubernetesCluster
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

-DrainTimeoutInMinute

The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-EnableAutoScaling

Whether to enable auto-scaler

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-EnableSecureBoot

The secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-EnableVtpm

The vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Force

Update node pool without prompt

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Id

Id of an node pool in managed Kubernetes cluster

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ResourceId

Parameter sets

-IfMatch

The request should only proceed if an entity matches this string.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-IfNoneMatch

The request should only proceed if no entity matches this string.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-InputObject

A PSAgentPool object, normally passed through the pipeline.

Parameter properties

Type:PSNodePool
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-KubernetesVersion

The version of Kubernetes to use for creating the cluster.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-MaxCount

Maximum number of nodes for auto-scaling

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-MaxSurge

The maximum number or percentage of nodes that ar surged during upgrade.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-MaxUnavailable

The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-MinCount

Minimum number of nodes for auto-scaling.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Mode

The pool mode

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Name

The name of the node pool.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-NetworkProfile

The network-related settings of an agent pool.

Parameter properties

Type:AgentPoolNetworkProfile
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-NodeCount

The number of nodes for the node pools.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-NodeImageOnly

Will only upgrade the node image of agent pools.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-NodeLabel

Node pool labels used for building Kubernetes network.

Parameter properties

Type:Hashtable
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-NodeSoakDurationInMinute

The the soak duration for a node. The amount of time (in minutes) to wait after draining a node and before reimaging it and moving on to next node. If not specified, the default is 0 minutes.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-NodeTaint

The node taints added to new nodes during node pool create and scale

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ResourceGroupName

The name of the resource group.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ScaleDownMode

The scale down mode to use when scaling the Agent Pool. This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-SshAccess

The sSH access method of an agent pool.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-SubscriptionId

The ID of the subscription. By default, cmdlets are executed in the subscription that is set in the current context. If the user specifies another subscription, the current cmdlet is executed in the subscription specified by the user. Overriding subscriptions only take effect during the lifecycle of the current cmdlet. It does not change the subscription in the context, and does not affect subsequent cmdlets.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Tag

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

Parameter properties

Type:Hashtable
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-UndrainableNodeBehavior

The behavior for undrainable nodes during upgrade. The most common cause of undrainable nodes is Pod Disruption Budgets (PDBs), but other issues, such as pod termination grace period is exceeding the remaining per-node drain timeout or pod is still being in a running state, can also cause undrainable nodes.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

PSNodePool

String

Outputs

PSNodePool


Feedback

Was this page helpful?