metrics-server no metrics known for pod error during deployment

11/25/2020

I have a newly created AWS EKS 1.18 Cluster, applications are deployed on it, everything is fine, test and load test are successful, namely, my HPA and metrics-server is working fine.

But when I make a deployment to a service, metrics-server is giving unable to fetch pod metrics for pod xxx: no metrics known for pod for the newly deployed pod, then problem is being resolved and everything is fine again.

My question is, is this an expected behaviour for metrics-server? Or should I check my configs again?

Thank you very much.

-- Oguzhan Aygun
amazon-eks
kubernetes
metrics-server

1 Answer

12/1/2020

There is a comment about that on github:

Metrics Server is expected to report "no metrics known for pod" until cache will be populated. Cache can be empty on freshly deployed metrics-server or can miss values for newly deployed pods.

So if I understand correctly it's working as expected. I assume this problem is being solved after 60s as by default metrics are scraped every 60s.

-- Jakub
Source: StackOverflow