You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/aks/vertical-pod-autoscaler.md
+45-1Lines changed: 45 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Vertical Pod Autoscaling (preview) in Azure Kubernetes Service (AKS)
3
3
description: Learn how to vertically autoscale your pod on an Azure Kubernetes Service (AKS) cluster.
4
4
services: container-service
5
5
ms.topic: article
6
-
ms.date: 09/30/2022
6
+
ms.date: 01/11/2023
7
7
---
8
8
9
9
# Vertical Pod Autoscaling (preview) in Azure Kubernetes Service (AKS)
@@ -394,6 +394,50 @@ Vertical Pod autoscaling uses the `VerticalPodAutoscaler` object to automaticall
394
394
395
395
The Vertical Pod Autoscaler uses the `lowerBound` and `upperBound` attributes to decide whether to delete a Pod and replace it with a new Pod. If a Pod has requests less than the lower bound or greater than the upper bound, the Vertical Pod Autoscaler deletes the Pod and replaces it with a Pod that meets the target attribute.
396
396
397
+
## Metrics server VPA throttling
398
+
399
+
With AKS clusters version 1.24 and higher, vertical pod autoscaling is enabled for the metrics server. This enables you to adjust the resource limit when the metrics server is experiencing consistent CPU and memory resource constraints.
400
+
401
+
If the metrics server throttling rate is high and the memory usage of its two pods are unbalanced, it indicates the metrics server requires more resources than specified by our default values.
402
+
403
+
To update the coefficient values, create a ConfigMap in the overlay *kube-system* namespace to override the values in the metrics server specification. Perform the following steps to update the metrics server.
404
+
405
+
1. Create a ConfigMap file named *metrics-server-config.yaml* and copy in the following manifest.
406
+
407
+
```yml
408
+
apiVersion: v1
409
+
kind: ConfigMap
410
+
metadata:
411
+
name: metrics-server-config
412
+
namespace: kube-system
413
+
labels:
414
+
kubernetes.io/cluster-service: "true"
415
+
addonmanager.kubernetes.io/mode: EnsureExists
416
+
data:
417
+
NannyConfiguration: |-
418
+
apiVersion: nannyconfig/v1alpha1
419
+
kind: NannyConfiguration
420
+
baseCPU: 100m
421
+
cpuPerNode: 1m
422
+
baseMemory: 100Mi
423
+
memoryPerNode: 8Mi
424
+
```
425
+
426
+
In this ConfigMap example, it changes the resource limit and request to the following:
427
+
428
+
* cpu: (100+1n)millicore
429
+
* memory: (100+8n)mebibyte
430
+
431
+
Where *n* is the number of nodes.
432
+
433
+
2. Create the ConfigMap using the [kubectl apply][kubectl-apply] command and specify the name of your YAML manifest:
434
+
435
+
```bash
436
+
kubectl apply -f metrics-server-config.yaml
437
+
```
438
+
439
+
Be cautious of the baseCPU, cpuPerNode, baseMemory, and the memoryPerNode. This ConfigMap will not be reconciled by AKS. As a recommended practice, increase the value step by step to avoid unnecessary resource consumption. Proactively monitor resource usage when updating or creating the ConfigMap. A large number of resource requests could negatively impact the node.
440
+
397
441
## Next steps
398
442
399
443
This article showed you how to automatically scale resource utilization, such as CPU and memory, of cluster nodes to match application requirements. You can also use the horizontal pod autoscaler to automatically adjust the number of pods that run your application. For steps on using the horizontal pod autoscaler, see [Scale applications in AKS][scale-applications-in-aks].
0 commit comments