Rancher Server 设置
Rancher 版本:V2.6.6 HA
安装选项 (Docker install/Helm Chart):
如果是 Helm Chart 安装,需要提供 Local 集群的类型(RKE1, RKE2, k3s, EKS, 等)和版本:
在线或离线部署:
RKE1
下游集群信息
Kubernetes 版本: v1.18.20-rancher-1-1
Cluster Type (Local/Downstream):
如果 Downstream,是什么类型的集群?(自定义/导入或为托管 等):
导入的老版本ui创建的集群,为rke1
用户信息
登录用户的角色是什么? (管理员/集群所有者/集群成员/项目所有者/项目成员/自定义):
问题描述:
现在发现V2.6.6 UI里面,集群的资源信息显示一直不动,但我宿主机kubect top node
就显示正确的,我也根据有个帖子里面牛牛老大给的连接 xxxx/cluster-id/xxx 访问,显示的数据也是对的,我记得他说前端会不断轮巡这个接口的数据。
虽然metrics-server pod 显示
unable to fetch node metrics for node “izuf6fqhk4voeddhyc5g5iz”: no metrics known for node
unable to fetch node metrics for node “izuf6fqhk4voeddhyc5g5jz”: no metrics known for node
但查看项目的github ,官方又说这个是老版本的提示,不用管,不是错误,新版本会去除
opened 11:06PM - 05 Nov 19 UTC
closed 08:57AM - 15 Jun 20 UTC
help wanted
kind/cleanup
priority/important-soon
There are a lot of issues where users are seeing metrics-server reporting error … "no metrics known for pod" and asking for help.
To my understanding this error is expected to occur in normal healthy metrics-server.
Metrics Server periodically scrapes all nodes to gather metrics and populate it's internal cache. When there is a request to Metrics API, metrics-server reaches to this cache and looks for existing value for pod. If there is no value for existing pod in k8s, metrics server reports error "no metrics known for pod". This means this error can happen in situation when:
* fresh metrics-server is deployed with clean cache
* query is about fresh pod/node that was not yet scraped
Providing better information to users would greatly reduce throughput of tickets.
那我现在就有点蒙圈了,是Rancher v2.6.6 的前端UI BUG呢?还是啥问题呢?
现在个人解决的办法就是安装监控,那里面的数据是正常的
重现步骤:
结果:
预期结果:
截图:
其他上下文信息:
日志
我无法重现此问题。
你可以调出浏览器的开发者工具,查看XHR中关于 metrics
的请求。在我的环境中,访问集群node页面时,该请求是间隔一段时间轮训发送,并且每次都取得正常返回结果。