-
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_pod_status_ready is 2s late than pod.condistions.Ready timestamp #1830
Comments
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What happened:
Hello,
Because missing pod ready timestamp metrics, I am using kube_pod_status_ready to monitoring pod ready.
I use http API query kube_pod_status_ready , then find the ready timestamp by go though the metrics data. When detect value is 1, then return the timestamp.
But after double check the ready timestamp from "kubectl get po xxx -o yaml" , it seems the metrics status value is always 2s late than the real ready timestamp from pod condition Ready.
For example,from "kubectl get po <xxx_pod_name> -o yaml"
Prometheus config, I am using 1s as scrape_interval.
But from metrics result, I got below
I also checked the source code, looks like everything is correct.
kube-state-metrics/internal/store/pod.go
Line 1299 in 20ef8a7
What you expected to happen:
Is there a way to get ready timestamp more accurate?
Because I need calculate the startup time for a pod, I will need to know when the pod become ready.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
kubectl version
):The text was updated successfully, but these errors were encountered: