-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[receiver/kubeletstats] Service account token is not getting reloaded resulting in 401 errors #26120
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Pinging code owners for internal/k8sconfig: @dmitryax. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Pinging code owners for internal/kubelet: @dmitryax. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Looking through the ways that the kubeletestatsreceiver and the k8sclusterreceiver handle service account authentication it does appear that both receivers grab the token 1 time and build their clients with it. |
From my own quick research it seems to concern receivers that connect directly to the kubelet (so in my case,
|
Yeah, the kubelet client in |
#26316 fixed this issue. |
Component(s)
receiver/kubeletstats
What happened?
Description
After running for several weeks without any issues we started encounter issues with missing metrics from kubeletstatsreceiver. After inspecting the logs it seems that token used for authentication with kubelet is not getting automatically reloaded, resulting in 401 errors when scraping the data. I'm not 100% sure if that was caused by expiration or by Azure rotating service account token issuer.
We are also running k8sclusterreceiver on the same cluster which didn't seem to have any issues. Restarting collector instance cleared the issue.
Steps to Reproduce
Expected Result
kubeletreceiver should (possibly after few minutes of delay) automatically pick up new token and continue scraping data
Actual Result
kubeletreceiver stops scraping data due to 401 errors and requires manual restart
Collector version
0.81.0
Environment information
Environment
OS: Azure Linux
Compiler(if manually compiled): go 1.20
Kubernetes 1.25.11 (AKS)
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: