尝试在 Amazon EKS 上设置 HorizontalPodAutoscaler 时,TARGETS 列始终显示<unknown>/50%,在描述 HPA 时,我看到
警告 FailedGetResourceMetric 17s(x50 over 1h)horizontal-pod-autoscaler 无法获取资源 cpu 的指标:无法从资源指标 API 获取指标:服务器找不到请求的资源(获取 pods.metrics.k8s.io)
我在其他网站上发现了多篇关于提到--horizontal-pod-autoscaler-use-rest-clients在 kube-controller-manager 上使用的类似问题的帖子,但我找不到更改 EKS 集群的 kube-controller-manager 设置的方法,因为看起来你不能SSH 到主节点进行管理和 kube-controller-manager 不会被列为系统中任何地方的资源。
我尝试按照https://github.com/kubernetes-incubator/metrics-server 上的说明手动设置指标服务器,但在这种情况下,我发现 EKS 没有提供验证 API 所需的配置映射扩展Could not create the API server: configmaps "extension-apiserver-authentication" not found