-
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
sharding with a deployment with '--resources=pods' and '--node=""' does not fetch pending pods #2353
Comments
This issue is currently awaiting triage. If kube-state-metrics contributors determine this is a relevant issue, they will accept it by applying the The 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. |
Thanks for reporting this. Could you help paste your pending pod yaml, if it's available? Want to see nodeName value on the yaml |
/assign @CatherineF-dev |
The pending pod doesn't even have the nodeName key, probably the key is only set after the pod is scheduled to a node.
|
Wondering whether apiserver fieldSelector supports |
I tried again and verified --node="" is translated into
|
I figured it out that the problem is the |
@carlosrmendes does it mean we need to fix this for KSM? Or just your local query doesn't work. |
I can reproduce it that /usr/lib/go-1.22/bin/go run main.go --resources=pods --node= --kubeconfig ~/.kube/config
curl localhost:8080/metrics | grep kube_pod_status |
What happened: a deployment with
--resources=pods
and--node=""
does not fetch pending podsWhat you expected to happen: pending pods be fetched by ksm
How to reproduce it (as minimally and precisely as possible):
--resources=pods
and--node=""
and-v=10
https://<kubernetes_api_ip>:443/api/v1/pods?allowWatchBookmarks=true&fieldSelector=spec.nodeName%3D%22%22&resourceVersion=3998681&timeout=5m23s&timeoutSeconds=323&watch=true
&fieldSelector=spec.nodeName%3D%22%22
and confirm that on the response, the pending pods does not have anynodeSelectot
key with an empty valuekubectl version
): k3s v1.24.10The text was updated successfully, but these errors were encountered: