2
2
title : Configure Metrics Server VPA in Azure Kubernetes Service (AKS)
3
3
description : Learn how to vertically autoscale your Metrics Server pods on an Azure Kubernetes Service (AKS) cluster.
4
4
ms.topic : article
5
- ms.date : 03/21 /2023
5
+ ms.date : 03/27 /2023
6
6
---
7
7
8
8
# Configure Metrics Server VPA in Azure Kubernetes Service (AKS)
@@ -24,22 +24,22 @@ To update the coefficient values, create a ConfigMap in the overlay *kube-system
24
24
1 . Create a ConfigMap file named * metrics-server-config.yaml* and copy in the following manifest.
25
25
26
26
``` yml
27
- apiVersion : v1
28
- kind : ConfigMap
29
- metadata :
30
- name : metrics-server-config
31
- namespace : kube-system
32
- labels :
33
- kubernetes.io/cluster-service : " true"
34
- addonmanager.kubernetes.io/mode : EnsureExists
35
- data :
36
- NannyConfiguration : |-
37
- apiVersion: nannyconfig/v1alpha1
38
- kind: NannyConfiguration
39
- baseCPU: 100m
40
- cpuPerNode: 1m
41
- baseMemory: 100Mi
42
- memoryPerNode: 8Mi
27
+ apiVersion : v1
28
+ kind : ConfigMap
29
+ metadata :
30
+ name : metrics-server-config
31
+ namespace : kube-system
32
+ labels :
33
+ kubernetes.io/cluster-service : " true"
34
+ addonmanager.kubernetes.io/mode : EnsureExists
35
+ data :
36
+ NannyConfiguration : |-
37
+ apiVersion: nannyconfig/v1alpha1
38
+ kind: NannyConfiguration
39
+ baseCPU: 100m
40
+ cpuPerNode: 1m
41
+ baseMemory: 100Mi
42
+ memoryPerNode: 8Mi
43
43
` ` `
44
44
45
45
In the ConfigMap example, the resource limit and request are changed to the following:
@@ -89,22 +89,22 @@ If you would like to bypass VPA for Metrics Server and manually control its reso
89
89
1. Create a ConfigMap file named *metrics-server-config.yaml* and copy in the following manifest.
90
90
91
91
` ` ` yml
92
- apiVersion: v1
93
- kind: ConfigMap
94
- metadata:
95
- name: metrics-server-config
96
- namespace: kube-system
97
- labels:
98
- kubernetes.io/cluster-service: "true"
99
- addonmanager.kubernetes.io/mode: EnsureExists
100
- data:
101
- NannyConfiguration: |-
102
- apiVersion: nannyconfig/v1alpha1
103
- kind: NannyConfiguration
104
- baseCPU: 100m
105
- cpuPerNode: 0m
106
- baseMemory: 100Mi
107
- memoryPerNode: 0Mi
92
+ apiVersion: v1
93
+ kind: ConfigMap
94
+ metadata:
95
+ name: metrics-server-config
96
+ namespace: kube-system
97
+ labels:
98
+ kubernetes.io/cluster-service: "true"
99
+ addonmanager.kubernetes.io/mode: EnsureExists
100
+ data:
101
+ NannyConfiguration: |-
102
+ apiVersion: nannyconfig/v1alpha1
103
+ kind: NannyConfiguration
104
+ baseCPU: 100m
105
+ cpuPerNode: 0m
106
+ baseMemory: 100Mi
107
+ memoryPerNode: 0Mi
108
108
` ` `
109
109
110
110
In this ConfigMap example, it changes the resource limit and request to the following :
@@ -126,7 +126,7 @@ If you would like to bypass VPA for Metrics Server and manually control its reso
126
126
kubectl -n kube-system delete po metrics-server-pod-name
127
127
` ` `
128
128
129
- 4. To verify the updated resources took affect , run the following command to review the Metrics Server VPA log.
129
+ 4. To verify the updated resources took effect , run the following command to review the Metrics Server VPA log.
130
130
131
131
` ` ` bash
132
132
kubectl -n kube-system logs metrics-server-pod-name -c metrics-server-vpa
@@ -150,22 +150,22 @@ If you would like to bypass VPA for Metrics Server and manually control its reso
150
150
1. If you use the following configmap, the Metrics Server VPA customizations aren't applied. You need add a unit for `baseCPU`.
151
151
152
152
` ` ` yml
153
- apiVersion: v1
154
- kind: ConfigMap
155
- metadata:
156
- name: metrics-server-config
157
- namespace: kube-system
158
- labels:
159
- kubernetes.io/cluster-service: "true"
160
- addonmanager.kubernetes.io/mode: EnsureExists
161
- data:
162
- NannyConfiguration: |-
163
- apiVersion: nannyconfig/v1alpha1
164
- kind: NannyConfiguration
165
- baseCPU: 100
166
- cpuPerNode: 1m
167
- baseMemory: 100Mi
168
- memoryPerNode: 8Mi
153
+ apiVersion: v1
154
+ kind: ConfigMap
155
+ metadata:
156
+ name: metrics-server-config
157
+ namespace: kube-system
158
+ labels:
159
+ kubernetes.io/cluster-service: "true"
160
+ addonmanager.kubernetes.io/mode: EnsureExists
161
+ data:
162
+ NannyConfiguration: |-
163
+ apiVersion: nannyconfig/v1alpha1
164
+ kind: NannyConfiguration
165
+ baseCPU: 100
166
+ cpuPerNode: 1m
167
+ baseMemory: 100Mi
168
+ memoryPerNode: 8Mi
169
169
` ` `
170
170
171
171
The following example output resembles the results showing the updated throttling settings aren't applied.
@@ -200,4 +200,4 @@ Metrics Server is a component in the core metrics pipeline. For more information
200
200
[metrics-server-api-design] : https://github.com/kubernetes/design-proposals-archive/blob/main/instrumentation/resource-metrics-api.md
201
201
202
202
<!--- INTERNAL LINKS --->
203
- [horizontal-pod-autoscaler] : concepts-scale.md#horizontal-pod-autoscaler
203
+ [horizontal-pod-autoscaler] : concepts-scale.md#horizontal-pod-autoscaler
0 commit comments