Skip to content

Commit 34ab657

Browse files
authored
Merge pull request #29296 from mengjiao-liu/fix-Selector-yaml
[zh] Fix `selector` expect map not string
2 parents 58d9f81 + bbc82ea commit 34ab657

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ First, get the YAML of your HorizontalPodAutoscaler in the `autoscaling/v2beta2`
304304
首先,将 HorizontalPodAutoscaler 的 YAML 文件改为 `autoscaling/v2beta2` 格式:
305305

306306
```shell
307-
kubectl get hpa.v2beta2.autoscaling -o yaml > /tmp/hpa-v2.yaml
307+
kubectl get hpa php-apache -o yaml > /tmp/hpa-v2.yaml
308308
```
309309

310310
<!--
@@ -597,7 +597,9 @@ HorizontalPodAutoscaler 的配置中。
597597
external:
598598
metric:
599599
name: queue_messages_ready
600-
selector: "queue=worker_tasks"
600+
selector:
601+
matchLabels:
602+
queue: "worker_tasks"
601603
target:
602604
type: AverageValue
603605
averageValue: 30

0 commit comments

Comments
 (0)