-
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
Is there or will there ever be metric for pods in terminating state? #348
Comments
How are you determining this today? If kube-state-metrics can find what you are looking for in a Pod object then yes, that's something we could add a metric for. |
If I query pods using
If I describe one of the PODs, the status is
|
When you view the yaml of this pod, can you see it there as well, or is this only available through events? |
Looks like it's only through describing the pod.
|
Yes that's what I thought. The tricky thing here is that we can only extract this information from Kubernetes Events. The problem with events is their cardinality, it is most likely going to explode. Something we could do is aggregate events and expose lower cardinality aggregations. This would definitely be a very different pattern from all the other collectors today, where the objects we create metrics from are in memory. With events we would need to listen to events and garbage collect them if they're older than some period. We could try this as an experiment, but my general feeling is that this is going to be somewhat unstable data. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/reopen /remove-lifecycle rotten |
Will this issue be re-opened? /reopen |
Given the fact that this information is not extractable from a pod manifest (see comment), this can not be achieved with the current architecture of kube-state-metrics. I am not sure we should introduce event aggregation here, just to support this use case. What are your thoughts? |
I see there are metrics for if a pod is terminated
kube_pod_container_status_terminated
however, we sometimes observe pods in terminating state.I was wondering if there is a way via kube-state-metrics to find this state? I couldnt see anything and I'm running v1.2.0
All I see in our prometheus are these:
If pods are stuck in terminating state then we usually have to take actions against the hosts they are running on.
We'd ideally like a solution via prometheus and alertmanager using kube-state-metrics metrics to alert us rather than having to create something home grown.
The text was updated successfully, but these errors were encountered: