datadog-agent: Failure to connect to kubelet
Hi,
I am getting logs in datadog, however the agent logs on K8 have the following errors:
[ TRACE ] trace-agent exited with code 0, disabling
[ AGENT ] 2018-10-17 08:18:24 UTC | WARN | (datadog_agent.go:149 in LogMessage) | (base.py:212) | DEPRECATION NOTICE: device_name is deprecated, please use a device: tag in the tags list instead
[ AGENT ] 2018-10-17 08:18:26 UTC | ERROR | (kubeutil.go:50 in GetKubeletConnectionInfo) | connection to kubelet failed: temporary failure in kubeutil, will retry later: try delay not elapsed yet
[ AGENT ] 2018-10-17 08:18:26 UTC | ERROR | (runner.go:289 in work) | Error running check kubelet: [{“message”: “Unable to detect the kubelet URL automatically.”, “traceback”: “Traceback (most recent call last):\n File "/opt/datadog-agent/embedded/lib/python2.7/site-packages/datadog_checks/checks/base.py", line 352, in run\n self.check(copy.deepcopy(self.instances[0]))\n File "/opt/datadog-agent/embedded/lib/python2.7/site-packages/datadog_checks/kubelet/kubelet.py", line 107, in check\n raise CheckException("Unable to detect the kubelet URL automatically.")\nCheckException: Unable to detect the kubelet URL automatically.\n”}]
[ AGENT ] 2018-10-17 08:18:28 UTC | ERROR | (autoconfig.go:604 in collect) | Unable to collect configurations from provider Kubernetes: temporary failure in kubeutil, will retry later: try delay not elapsed yet
image:
repository: datadog/agent
tag: 6.4.2
pullPolicy: IfNotPresent
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 4
- Comments: 16 (3 by maintainers)
@Aiqbal1234 So I managed to get around this as when I updated my cluster from 1.10 --> 1.11 the kubelet checks started failing with the same message (EKS platform V2, k8s 1.11). I don’t think that the version of the agent is entirely the problem.
What I did to resolve it was:
Also seeing this now. Weird thing is that it started about 6 days ago, on a new AKS cluster which had been running for about 2 weeks and has produced data ingested in Datadog (mainly logs).
2020-06-23 09:47:14 UTC | CORE | ERROR | (pkg/collector/runner/runner.go:292 in work) | Error running check kubelet: [{“message”: “Unable to detect the kubelet URL automatically.”, “traceback”: “Traceback (most recent call last):\n File "/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py", line 820, in run\n self.check(instance)\n File "/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/kubelet/kubelet.py", line 291, in check\n raise CheckException("Unable to detect the kubelet URL automatically.")\ndatadog_checks.base.errors.CheckException: Unable to detect the kubelet URL automatically.\n”}]