diff --git a/src/Aks/Aks/ChangeLog.md b/src/Aks/Aks/ChangeLog.md index 877607134edb..1e171918be95 100644 --- a/src/Aks/Aks/ChangeLog.md +++ b/src/Aks/Aks/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Fixed the 'Non-static method requires a target' error when updating the image version of the node pool. [#24337] ## Version 6.0.1 * Fixed the resolve path issue in `Install-AzAksCliTool`. diff --git a/src/Aks/Aks/Commands/UpdateAzureRmAksNodePool.cs b/src/Aks/Aks/Commands/UpdateAzureRmAksNodePool.cs index 7f31ffda4204..581cb19c5a94 100644 --- a/src/Aks/Aks/Commands/UpdateAzureRmAksNodePool.cs +++ b/src/Aks/Aks/Commands/UpdateAzureRmAksNodePool.cs @@ -163,8 +163,7 @@ public override void ExecuteCmdlet() return; } - var upgradedPool = Client.AgentPools.UpgradeNodeImageVersion(ResourceGroupName, ClusterName, Name); - WriteObject(AdapterHelper.Adapt(upgradedPool)); + Client.AgentPools.UpgradeNodeImageVersion(ResourceGroupName, ClusterName, Name); return; } if (this.IsParameterBound(c => c.NodeLabel))