DataDog / datadog-agent

Main repository for Datadog Agent
https://docs.datadoghq.com/
Apache License 2.0
2.88k stars 1.21k forks source link

Kubelet Error #5096

Open bitva77 opened 4 years ago

bitva77 commented 4 years ago

Describe what happened:

Errors when connecting to Kubelet:

2020-03-10 18:30:27 UTC | CORE | INFO | (pkg/util/kubernetes/kubelet/kubelet.go:793 in checkKubeletHTTPSConnection) | Successfully queried https://vwc1pewbapp14:10250/ without any security settings, adding security transport settings to query https://vwc1pewbapp14:10250/pods
2020-03-10 18:30:27 UTC | CORE | ERROR | (pkg/collector/python/kubeutil.go:38 in getConnections) | connection to kubelet failed: temporary failure in kubeutil, will retry later: cannot set a valid kubelet host: cannot connect to kubelet using any of the given hosts: [10.247.0.206] [10-247-0-206.kubelet.kube-system.svc.cluster.local. vwc1pewbapp14], Errors: [Get https://10.247.0.206:10250/pods: x509: certificate has expired or is not yet valid Get https://10-247-0-206.kubelet.kube-system.svc.cluster.local.:10250/pods: x509: certificate has expired or is not yet valid Get https://vwc1pewbapp14:10250/pods: x509: certificate has expired or is not yet valid cannot connect: http: "Get http://10.247.0.206:10255/: dial tcp 10.247.0.206:10255: connect: connection refused" cannot connect: http: "Get http://10-247-0-206.kubelet.kube-system.svc.cluster.local.:10255/: dial tcp 10.247.0.206:10255: connect: connection refused" cannot connect: http: "Get http://vwc1pewbapp14:10255/: dial tcp 10.247.0.206:10255: connect: connection refused"]
2020-03-10 18:30:27 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.7/site-packages/datadog_checks/base/checks/base.py\", line 673, in run\n    self.check(instance)\n  File \"/opt/datadog-agent/embedded/lib/python3.7/site-packages/datadog_checks/kubelet/kubelet.py\", line 236, 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"}]

Describe what you expected:

I expect the agent to be able to communicate with Kubelet and not throw errors like "x509: certificate has expired or is not yet valid "

Steps to reproduce the issue:

Install dd-agent.yaml as per directions (as a DaemonSet)

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

RedHat 7.5 Kubernetes 1.15.2 Kubeadm install

khewonc commented 4 years ago

Hi @bitva77, if you're still encountering this kubelet error, so that support can investigate further, can you open up a support ticket and send a debug flare?