kubenetes hpa部署后使用kubectl get hpa命令一直显示unkonwn
describe后显示如下报错:
Warning FailedComputeMetricsReplicas 12s (x3 over 42s) horizontal-pod-autoscaler invalid metrics (1 invalid out of 1), first error is: failed to get cpu utilization: unable to get metrics for resource cpu: unable to fetch metrics from resource metrics API: an error on the server ("Internal Server Error: "/apis/metrics.k8s.io/v1beta1/namespaces/default/pods?labelSelector=app%3Dnginx": the server could not find the requested resource") has prevented the request from succeeding (get pods.metrics.k8s.io)