From 2eda36ea27cc822adf2be9178c7fb7fc9069b25a Mon Sep 17 00:00:00 2001 From: Vijay Kumar Jalagari Date: Thu, 5 Aug 2021 16:10:36 +0530 Subject: [PATCH] Selector expect map not string If we using string then k8s api is throwing validation error ``` (HorizontalPodAutoscaler.spec.metrics[0].object.metric.selector): invalid type for io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector: got "string", expected "map"; if you choose to ignore these errors, turn validation off with --validate=false ``` --- .../run-application/horizontal-pod-autoscale-walkthrough.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md b/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md index 0e6ebd97d0..6328d458fb 100644 --- a/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md +++ b/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md @@ -397,7 +397,9 @@ section to your HorizontalPodAutoscaler manifest to specify that you need one wo external: metric: name: queue_messages_ready - selector: "queue=worker_tasks" + selector: + matchLabels: + queue: "worker_tasks" target: type: AverageValue averageValue: 30