Update-AzAksNodePool
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>]
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
Aks custom headers
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AsJob
Run cmdlet in the background
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ClusterName
The name of the managed cluster resource.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
defaultParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ClusterObject
The cluster object
Parameter properties
Parameter sets
ParentObjectParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EnableAutoScaling
Whether to enable auto-scaler
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Force
Update node pool without prompt
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
IdParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
A PSAgentPool object, normally passed through the pipeline.
Type: PSNodePool
Default value: None
Supports wildcards: False
DontShow: False
InputObjectParameterSet
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-MaxCount
Maximum number of nodes for auto-scaling
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-MinCount
Minimum number of nodes for auto-scaling.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Mode
The pool mode
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The name of the node pool.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
defaultParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ParentObjectParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NetworkProfile
The network-related settings of an agent pool.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NodeCount
The number of nodes for the node pools.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NodeImageOnly
Will only upgrade the node image of agent pools.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NodeLabel
Node pool labels used for building Kubernetes network.
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the resource group.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
defaultParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SshAccess
The sSH access method of an agent pool.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
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 .
Outputs