Skip to content

Commit 71312e1

Browse files
authored
Update horizontal-pod-autoscale-walkthrough.md
Provide an example of `memory`.
1 parent 5ea6ba0 commit 71312e1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,23 @@ status:
263263
Notice that the `targetCPUUtilizationPercentage` field has been replaced with an array called `metrics`.
264264
The CPU utilization metric is a *resource metric*, since it is represented as a percentage of a resource
265265
specified on pod containers. Notice that you can specify other resource metrics besides CPU. By default,
266-
the only other supported resource metric is memory. These resources do not change names from cluster
266+
the only other supported resource metric is `memory`. These resources do not change names from cluster
267267
to cluster, and should always be available, as long as the `metrics.k8s.io` API is available.
268268

269269
You can also specify resource metrics in terms of direct values, instead of as percentages of the
270270
requested value, by using a `target.type` of `AverageValue` instead of `Utilization`, and
271271
setting the corresponding `target.averageValue` field instead of the `target.averageUtilization`.
272272

273+
```
274+
metrics:
275+
- type: Resource
276+
resource:
277+
name: memory
278+
target:
279+
type: AverageValue
280+
averageValue: 500Mi
281+
```
282+
273283
There are two other types of metrics, both of which are considered *custom metrics*: pod metrics and
274284
object metrics. These metrics may have names which are cluster specific, and require a more
275285
advanced cluster monitoring setup.

0 commit comments

Comments
 (0)