【发布时间】:2018-11-20 20:39:56
【问题描述】:
我已经在 kubernetes 上安装了度量服务器,但是它不工作并记录了
unable to fully collect metrics: [unable to fully scrape metrics from source kubelet_summary:xxx: unable to fetch metrics from Kubelet ... (X.X): Get https:....: x509: cannot validate certificate for 1x.x.
x509: certificate signed by unknown authority
如果修改部署 yaml 并添加,我能够获取指标
command:
- /metrics-server
- --kubelet-insecure-tls
- --kubelet-preferred-address-types=InternalIP
这现在收集指标,kubectl 顶部节点返回结果...
但日志仍然显示
E1120 11:58:45.624974 1 reststorage.go:144] unable to fetch pod metrics for pod dev/pod-6bffbb9769-6z6qz: no metrics known for pod
E1120 11:58:45.625289 1 reststorage.go:144] unable to fetch pod metrics for pod dev/pod-6bffbb9769-rzvfj: no metrics known for pod
E1120 12:00:06.462505 1 manager.go:102] unable to fully collect metrics: [unable to fully scrape metrics from source kubelet_summary:ip-1x.x.x.eu-west-1.compute.internal: unable to get CPU for container ...discarding data: missing cpu usage metric, unable to fully scrape metrics from source
问题
1) 所有这些都适用于 minikube,但不适用于我的开发集群,为什么会这样?
2) 在生产中我不想做不安全的 tls.. 所以有人可以解释为什么会出现这个问题...或指向一些资源。
【问题讨论】:
标签: kubernetes