-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kube-state-metrics keeps failed pods around for kube_pod_* metrics #414
Comments
@dlespiau This is the desired behavior for kube-state-metrics to scrape If you do not like two show On the other hand, some users may still want to query those info to or analyze or add an alarm. |
Hi Andy. That makes sense, but your "As stated many times in other places" makes me think that's not what people are expecting the default behaviour to be, ie. by default report only running pods and join with Maybe having it somewhere at a prominent place in the docs would alleviate the problem of an unexpected behaviour, it seems like a big trap people fall into. |
I think it would be fair to add a note high in then readme calling out that kube-state-metrics is about representing the state of the Kubernetes API as metrics as opposed to “what kubectl shows”. |
@brancz Will you help to add this tip? |
Thank you! |
Some
kube_pod_*
metrics exist for Failed pods:kube_status_phase
shows that kube-state-metrics is populating this group of metrics with information about the failed (non running) pods:kubectl
is indeed confirming there's only one pod running (and so are thekube_pod_container_*
metrics).I would expect the metrics above to only show
Pending|Running
pods, maybeUnknown
but I'm not sure when the last value is set and seems like it could be a transient state more than anything else.The text was updated successfully, but these errors were encountered: