question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'KubeletCheck' object has no attribute 'kubelet_credentials'

See original GitHub issue

Additional environment details (Operating System, Cloud provider, etc):

  • k8s: 1.12.5-gke.5
  • datadog-agent: 6.10.1

Steps to reproduce the issue:

  1. 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:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
xvellocommented, Apr 4, 2019

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.

0reactions
TheKevJamescommented, Jun 6, 2019

My bad, should have closed this issue – I’ve verified its fixed as of 6.11.0. Thanks again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Authenticating | Kubernetes
In this regard, Kubernetes does not have objects which represent normal user ... Service accounts are tied to a set of credentials stored...
Read more >
Error during upgrade to version 1.18.1 · Issue #8694 - GitHub
{"msg": "The conditional check 'not kubeadm_version ... 'dict object' has no attribute u'v1.22.8'\n\nThe error appears to be in ...
Read more >
Python kubernetes module has no attribute 'api_key'
I think need to change the code a little bit replace this line kubernetes.client.configuration.api_key['authorization'] = 'YOUR_API_KEY'.
Read more >
Kubernetes RBAC, TLS Certificates Security Guide - Sysdig
Learn how to set Kubernetes security RBAC and TLS certificates step by step with practical examples. Read this Sysdig blog post to learn ......
Read more >
The Kubernetes executor for GitLab Runner
GitLab Runner can use Kubernetes to run builds on a Kubernetes cluster. This is possible with the use of the Kubernetes executor. The...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found