Kubernetes HPA:无法获取内存利用率:无法获取资源内存的指标:没有从资源指标API返回指标
我将metric服务器部署到EKS中Kubernetes HPA:无法获取内存利用率:无法获取资源内存的指标:没有从资源指标API返回指标,kubernetes,kubernetes-hpa,Kubernetes,Kubernetes Hpa,我将metric服务器部署到EKS中 kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.3.7/components.yaml 但是当我运行kubectl descripe hpa hpa frontend Warning FailedGetResourceMetric 2m5s (x3 over 2m35s) horizontal-pod-autosc
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.3.7/components.yaml
但是当我运行kubectl descripe hpa hpa frontend
Warning FailedGetResourceMetric 2m5s (x3 over 2m35s) horizontal-pod-autoscaler unable to get metrics for resource memory: no metrics returned from resource metrics API
Warning FailedGetResourceMetric 2m5s (x3 over 2m35s) horizontal-pod-autoscaler unable to get metrics for resource cpu: no metrics returned from resource metrics API
Warning FailedComputeMetricsReplicas 2m5s (x3 over 2m35s) horizontal-pod-autoscaler invalid metrics (2 invalid out of 2), first error is: failed to get memory utilization: unable to get metrics for resource memory: no metrics returned from resource metrics API
Warning FailedGetResourceMetric 65s (x4 over 110s) horizontal-pod-autoscaler did not receive metrics for any ready pods
我已经在使用此设置:
containers:
- name: metrics-server
image: k8s.gcr.io/metrics-server/metrics-server:v0.3.7
imagePullPolicy: IfNotPresent
command:
- /metrics-server
- --kubelet-insecure-tls=true
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
- --v=2
args:
- --cert-dir=/tmp
- --secure-port=4443
请在部署度量服务器以获取度量后等待一分钟。试着使用你的前端服务,这样它可以消耗一些cpu和ram。你确保所有这些都完成了吗?