Skip to content

Commit 3d00677

Browse files
authored
[AKS] Autoscaling support for VMs agentpool (#9012)
1 parent bbbff3f commit 3d00677

File tree

10 files changed

+3146
-13
lines changed

10 files changed

+3146
-13
lines changed

src/aks-preview/HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ Pending
1313
+++++++
1414
* Add machine command `az aks machine add` to add a machine to an existing machine pool.
1515

16+
18.0.0b37
17+
+++++++
18+
* Enable autoscaler support for the VirtualMachines agent pool type.
19+
* Add `--node-vm-size` to `az aks update` to allow changing the VM size for VirtualMachines node pools.
20+
1621
18.0.0b36
1722
+++++++
1823
* Add option `AzureLinux3` to `--os-sku` for `az aks nodepool add` and `az aks nodepool update`.

src/aks-preview/azext_aks_preview/_help.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2251,6 +2251,9 @@
22512251
- name: --localdns-config
22522252
type: string
22532253
short-summary: Set the localDNS Profile for a nodepool with a JSON config file.
2254+
- name: --node-vm-size -s
2255+
type: string
2256+
short-summary: VM size for Kubernetes nodes. Only configurable when updating the autoscale settings of a VirtualMachines node pool.
22542257
examples:
22552258
- name: Reconcile the nodepool back to its current state.
22562259
text: az aks nodepool update -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster
@@ -2262,6 +2265,8 @@
22622265
text: az aks nodepool update --update-cluster-autoscaler --min-count 1 --max-count 10 -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster
22632266
- name: Change a node pool to system mode
22642267
text: az aks nodepool update --mode System -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster
2268+
- name: Update cluster autoscaler vm size, min-count and max-count for virtual machines node pool
2269+
text: az aks nodepool update -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --update-cluster-autoscaler --node-vm-size "Standard_D2s_v3" --min-count 2 --max-count 4
22652270
"""
22662271

22672272
helps['aks nodepool get-upgrades'] = """

src/aks-preview/azext_aks_preview/_params.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,6 +1891,11 @@ def load_arguments(self, _):
18911891
'localdns_config',
18921892
help='Path to a JSON file to configure the local DNS profile for an existing nodepool.',
18931893
)
1894+
c.argument(
1895+
"node_vm_size",
1896+
options_list=["--node-vm-size", "-s"],
1897+
completer=get_vm_size_completion_list,
1898+
)
18941899

18951900
with self.argument_context("aks nodepool upgrade") as c:
18961901
c.argument("max_surge", validator=validate_max_surge)

0 commit comments

Comments
 (0)