Google cloud platform GCP GKE HPA无法读取度量值的问题

Google cloud platform GCP GKE HPA无法读取度量值的问题,google-cloud-platform,google-kubernetes-engine,Google Cloud Platform,Google Kubernetes Engine,我们在GKE GCP上使用CPU利用率进行缩放测试,但遇到了CPU利用率“HPA无法读取度量值”的错误。我找不到解决办法。早些时候,安装程序使用完全相同的安装步骤,但现在出现此错误。在事件中,错误是 unable to get metrics for resource cpu: unable to fetch metrics from resource metrics API: the server is currently unable to handle the request (get p

我们在GKE GCP上使用CPU利用率进行缩放测试,但遇到了CPU利用率“HPA无法读取度量值”的错误。我找不到解决办法。早些时候,安装程序使用完全相同的安装步骤,但现在出现此错误。在事件中,错误是

unable to get metrics for resource cpu: unable to fetch metrics from resource metrics API: the server is currently unable to handle the request (get pods.metrics.k8s.io)   FailedGetResourceMetric 
    
failed to compute desired number of replicas based on listed metrics for Deployment/testscale/testscale: failed to get cpu utilization: unable to get metrics for resource cpu: unable to fetch metrics from resource metrics API: the server is currently unable to handle the request (get pods.metrics.k8s.io)   FailedComputeMetricsReplicas
我尝试将资源请求放在yaml中,但没有成功。还尝试了以下操作以获取有关metric server的一些信息,但显示服务器不可用。有人有什么建议吗

kubectl get pods --all-namespaces | grep metrics-server
kube-system   metrics-server-v0.3.6-856b7cfdd5-6ngjt                      0/2     Pending   0          5h40m
kubectl get --raw "/apis/metrics.k8s.io/v1beta1/namespaces/default/pods"
Error from server (ServiceUnavailable): the server is currently unable to handle the request

来自服务器的kubectl top pods错误(ServiceUnavailable):服务器当前无法处理请求(get pods.metrics.k8s.io)来自服务器的kubectl top pods错误(ServiceUnavailable):服务器当前无法处理请求(get pods.metrics.k8s.io)``由于未部署metrics server pod,您将无法获取度量。您使用的是什么GKE版本?请提供kubectl Descripte po metrics-server-v0.3.6-856b7cfdd5-6ngjt-n kube系统的输出,以检查pod仍处于
Pending
状态的原因,这可能是由于缺乏资源、污染、策略等。您分配给该集群多少资源(RAM和CPU)。您的集群有多少个节点?当我尝试重新部署处于运行状态但仍然出现hpa度量错误“kube system metrics-server-v0.3.6-64655c969-88tlc 2/2 running 0 3h19m”时,此api调用也在运行
kubectl get--raw”/api/metrics.k8s.io/v1beta1/namespace/scaletest1/pods
,此外,在某些地区和其他部署相同的地区也出现了此问题。此问题仅影响某些地区,而不是所有使用相同工作负载的地区