我设置了datadog和kubernetes来测试监视,尽管在datadog中我可以看到一些日志和指标,但在kubernetes的代理中却出现以下错误:
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
由于日志指出代理无法连接到Kubectl,有人遇到过吗?
答案 0 :(得分:0)
这可能是other people are running into too的问题。 kubelet不再在新的Kubernetes版本中在ReadOnlyPort上侦听,并且已弃用该端口。 Samuel Cormier-Iijima报告说,可以通过在节点主机上的KUBELET_EXTRA_ARGS=--read-only-port=10255
中添加/etc/default/kubelet
来解决此问题。