环境信息
名称 | 版本 |
kubernetes | v17.17 |
trident | v19.10 |
问题描述
安装prometheus之后在web页面无法查询kubelet_volume*...........指标信息
问题排查
1. 进入节点调用kubelet的metrics的api查询是否有指标信息
创建RBAC进行API授权
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: system:metrics-server
rules:
- apiGroups:
- ""
resources:
- pods
- nodes
- nodes/stats
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- "extensions"
resources:
- deployments
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: system:metrics-server
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:metrics-server
subjects:
- kind: ServiceAcco