Not able to implement HPA on the AWS EKS Fargate because of an issue on the metric server

159 Views Asked by At

I ran the following command to install the metrics server on the AWS EKS Fargate so that I can implement HPA on the AWS EKS Fragate pods (used this aws doc https://docs.aws.amazon.com/eks/latest/userguide/metrics-server.html for downloading metric-server)

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml

But when checking the status of the metric-server created, I get the following error.

"E0124 20:06:19.813199 1 scraper.go:149] "Failed to scrape node" err="Get "https://10.0.138.91:10250/metrics/resource": tls: failed to verify certificate: x509: certificate is valid for 127.0.0.1, not 10.0.138.91" node="fargate-ip-10-0-138-91.ec2.internal" enter image description here

And also I am not able to get the output of these commands.

Kubectl top pods -A

Its sows the error "Error from server (ServiceUnavailable): the server is currently unable to handle the request (get pods.metrics.k8s.io) " enter image description here

0

There are 0 best solutions below