'KubeletCheck' object has no attribute 'kubelet_credentials'
See original GitHub issueAdditional environment details (Operating System, Cloud provider, etc):
k8s
: 1.12.5-gke.5datadog-agent
: 6.10.1
Steps to reproduce the issue:
- Run
datadog-agent:6.10.1
in a cluster.
Describe the results you received:
I’m getting the following warning on startup of any 6.10.1
datadog agents in a Kubernetes cluster on GKE with version 1.12.5-gke.5
:
[ AGENT ] 2019-03-08 20:38:29 UTC | WARN | (pkg/collector/py/datadog_agent.go:148 in LogMessage) | (kubelet.py:264) | kubelet check https://10.128.0.4:10250/healthz failed: 'KubeletCheck' object has no attribute 'kubelet_credentials'
Describe the results you expected: Not getting this warning and the failed health check.
Additional information you deem important (e.g. issue happens only occasionally):
Looks like the kubelet_credentials
value is created here in KubeletCheck.check(..)
but used here in KubeletCheck.perform_kubelet_query(..)
.
The offending method would be KubeletCheck.check(..)
call to _perform_kubelet_check
here which therefore attempts to call the method which uses those credentials before the method which instantiates them.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
Indeed, there is a lifecycle issue in the kubelet check. Although subsequent runs will be OK, the first check run will fail, creating a false-positive on the service check. https://github.com/DataDog/integrations-core/pull/3457 will fix it in 6.11.0
In the meantime, you can set monitors to only trigger on two+ consecutive failed checks, to filter out this blip.
My bad, should have closed this issue – I’ve verified its fixed as of 6.11.0. Thanks again!