@@ -310,6 +310,47 @@ If you create the cluster using the Azure Portal you must enable RBAC.
310
310
RBAC is enabled by default when using the command line tools.
311
311
```
312
312
313
+ 11 . Enabling Autoscaling (Optional)
314
+
315
+ If your cluster is prepared for autoscaling (` --enable-cluster-autoscaler ` ),
316
+ move to the Azure Portal to enable autoscaling and set rules to manage the Cluster Autoscaler.
317
+
318
+ Navigate to your active subscription on the [ Portal] ( https://portal.azure.com/ ) .
319
+
320
+ Under "Resources", select the VMSS.
321
+ It should be named something like ` aks-nodepool1-<random-str>-vmss ` .
322
+
323
+ ``` {image} ../../_static/images/azure/select_vmss.png
324
+ :align: center
325
+ ```
326
+
327
+ From the left-hand menu, select "Scaling".
328
+ Click the blue "Custom autoscale" button and an autogenerated form for a scale condition will appear.
329
+ We will add two new rules to this condition:
330
+
331
+ - Increase the instance count by 1 when the average CPU usage over 10 minutes is greater than 70%
332
+ - Decrease the instance count by 1 when the average CPU usage over 10 minutes is less than 5%
333
+
334
+ ```{image} ../../_static/images/azure/scale_condition.png
335
+ :align: center
336
+ ```
337
+
338
+ Make sure the "Scale based on metric" option is selected and click "+ Add new rule", another autogenerated form will appear.
339
+ This will be pre-filled with the required settings to fulfill our first rule, so save it by clicking "Update" and click "+ Add new rule" again.
340
+
341
+ ```{image} ../../_static/images/azure/scale_out.png
342
+ :align: center
343
+ ```
344
+
345
+ The second form needs to be edited for the second rule to decrease the instance count by 1 when the average CPU usage over 10 minutes is less than 5%.
346
+ Save this rule and then save the overall scale condition, the cluster will be updated automatically.
347
+
348
+ ```{image} ../../_static/images/azure/scale_in.png
349
+ :align: center
350
+ ```
351
+
352
+ This form can also be used to change `--node-count`/`--min-count`/`--max-count` that was set previously by using the "Instance limits" section of the scale condition ("Default", "Minimum" and "Maximum" respectively).
353
+
313
354
Congrats. Now that you have your Kubernetes cluster running, it's time to
314
355
begin {ref}`setup-helm`.
315
356
0 commit comments