0

I'm trying to get the metrics server up, I followed the instructions mentioned in the Github repository (https://github.com/kubernetes-sigs/metrics-server). I'm getting this error when I see the pod logs

I0314 14:35:34.594524       1 serving.go:342] Generated self-signed cert (/tmp/apiserver.crt, /tmp/apiserver.key)
I0314 14:35:35.047018       1 secure_serving.go:266] Serving securely on [::]:443
I0314 14:35:35.047891       1 requestheader_controller.go:169] Starting RequestHeaderAuthRequestController
I0314 14:35:35.048004       1 shared_informer.go:240] Waiting for caches to sync for RequestHeaderAuthRequestController
I0314 14:35:35.048188       1 dynamic_serving_content.go:131] "Starting controller" name="serving-cert::/tmp/apiserver.crt::/tmp/apiserver.key"
E0314 14:35:35.050427       1 scraper.go:140] "Failed to scrape node" err="request failed, status: \"404 Not Found\"" node="ip-172-31-22-227.us-west-2.compute.internal"
E0314 14:35:35.050479       1 scraper.go:140] "Failed to scrape node" err="request failed, status: \"404 Not Found\"" node="ip-172-31-20-129.us-west-2.compute.internal"
I0314 14:35:35.050546       1 tlsconfig.go:240] "Starting DynamicServingCertificateController"
E0314 14:35:35.047379       1 scraper.go:140] "Failed to scrape node" err="request failed, status: \"404 Not Found\"" node="ip-172-31-56-251.us-west-2.compute.internal"
W0314 14:35:35.050635       1 shared_informer.go:372] The sharedIndexInformer has started, run more than once is not allowed
I0314 14:35:35.050699       1 configmap_cafile_content.go:201] "Starting controller" name="client-ca::kube-system::extension-apiserver-authentication::requestheader-client-ca-file"
I0314 14:35:35.050708       1 shared_informer.go:240] Waiting for caches to sync for client-ca::kube-system::extension-apiserver-authentication::requestheader-client-ca-file
I0314 14:35:35.050731       1 configmap_cafile_content.go:201] "Starting controller" name="client-ca::kube-system::extension-apiserver-authentication::client-ca-file"
I0314 14:35:35.050741       1 shared_informer.go:240] Waiting for caches to sync for client-ca::kube-system::extension-apiserver-authentication::client-ca-file
E0314 14:35:35.051413       1 scraper.go:140] "Failed to scrape node" err="request failed, status: \"404 Not Found\"" node="ip-172-31-57-160.us-west-2.compute.internal"
E0314 14:35:35.077006       1 scraper.go:140] "Failed to scrape node" err="request failed, status: \"404 Not Found\"" node="ip-172-31-4-16.us-west-2.compute.internal"
E0314 14:35:35.084091       1 scraper.go:140] "Failed to scrape node" err="request failed, status: \"404 Not Found\"" node="ip-172-31-19-149.us-west-2.compute.internal"
E0314 14:35:35.099050       1 scraper.go:140] "Failed to scrape node" err="request failed, status: \"404 Not Found\"" node="ip-172-31-15-28.us-west-2.compute.internal"
E0314 14:35:35.099496       1 scraper.go:140] "Failed to scrape node" err="request failed, status: \"404 Not Found\"" node="ip-172-31-29-201.us-west-2.compute.internal"

Could someone help?

Sai Prasanth
  • 73
  • 1
  • 13
  • Hi Sai Prasanth, could you add some details on how exactly you set up a Kubernetes cluster in EKS (ec2 nodes/ fargate), k8s version, and how you installed the metrics server (some command or helm chart)? – mozello Mar 15 '22 at 10:01
  • Hi @mozello, EKs cluster is installed normally but with user access restrictions. I'm using the latest EKSCTL & k8s version. I installed the metrics server directly using the command given in the official GitHub repository. Could this problem occur because I have added user restrictions in the cluster? – Sai Prasanth Mar 16 '22 at 12:02
  • Could you add the details on how you set up a k8s cluster? I tested the metrics-server in both standard and 'High Availability' versions on AWS EKS (2 nodes) and there are no errors in logs.Tested it on k8s eks version 1.21.5. – mozello Mar 21 '22 at 16:43
  • What restrictions did you add to the cluster? – mozello Mar 21 '22 at 16:48
  • only added IAM restrictions to the cluster, basically only certain users can access the cluster. https://docs.aws.amazon.com/eks/latest/userguide/add-user-role.html – Sai Prasanth Mar 22 '22 at 09:30
  • So, metrics server works when the user who created an EKS cluster installs k8s metrics-server, right? Could you add some details on what restrictions you added to the cluster? Maybe the content of that ConfigMap? Was the metrics server installed before you added these restrictions? – mozello Mar 24 '22 at 17:42
  • Can you try adding `--kubelet-insecure-tls` to true on metrics-server deployment. – Zangetsu Jul 01 '22 at 16:35

0 Answers0