Rancher Server 设置
- Rancher 版本:2.7
- 安装选项 (Docker install/Helm Chart): rke2
问题描述:
我希望创建一个角色,只能查看pod的日志、配置、状态等信息。
在以下截图的红框位置中,如果是管理员,则有一个“指标”的选项,能够看到CPU、内存等监控图。
但是目前我添加的角色并没有这个信息,请问应该如何配置权限才能看到“指标”。
当前只读角色权限配置信息如下
administrative: false
apiVersion: management.cattle.io/v3
builtin: false
clusterCreatorDefault: false
context: cluster
description: null
displayName: 开发人员
external: false
hidden: false
kind: RoleTemplate
locked: false
metadata:
annotations:
cleanup.cattle.io/rtUpgradeCluster: “true”
field.cattle.io/creatorId: user-2rx5s
lifecycle.cattle.io/create.mgmt-auth-roletemplate-lifecycle: “true”
creationTimestamp: “2023-04-03T07:04:39Z”
finalizers:
-
controller.cattle.io/mgmt-auth-roletemplate-lifecycle
generateName: rt-
generation: 48
labels:
cattle.io/creator: norman
managedFields: - apiVersion: management.cattle.io/v3
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
f:lifecycle.cattle.io/create.mgmt-auth-roletemplate-lifecycle: {}
f:finalizers:
.: {}
v:“controller.cattle.io/mgmt-auth-roletemplate-lifecycle”: {}
manager: rancher
operation: Update
time: “2023-04-03T07:04:39Z” - apiVersion: management.cattle.io/v3
fieldsType: FieldsV1
fieldsV1:
f:administrative: {}
f:builtin: {}
f:clusterCreatorDefault: {}
f:context: {}
f:description: {}
f:displayName: {}
f:external: {}
f:hidden: {}
f:locked: {}
f:metadata:
f:annotations:
.: {}
f:cleanup.cattle.io/rtUpgradeCluster: {}
f:field.cattle.io/creatorId: {}
f:generateName: {}
f:labels:
.: {}
f:cattle.io/creator: {}
f:projectCreatorDefault: {}
f:roleTemplateNames: {}
f:rules: {}
manager: Go-http-client
operation: Update
time: “2023-04-03T07:06:24Z”
name: rt-jhtbx
resourceVersion: “22842959”
uid: 9586d318-e9c6-4a9a-bbf8-357f348b91a5
projectCreatorDefault: false
roleTemplateNames:
rules: - apiGroups:
- “”
nonResourceURLs:
resourceNames:
resources: - namespaces
verbs: - list
- watch
- get
- “”
- apiGroups:
- “”
nonResourceURLs:
resourceNames:
resources: - pods
verbs: - list
- watch
- get
- “”
- apiGroups:
- “”
nonResourceURLs:
resourceNames:
resources: - services
verbs: - list
- watch
- get
- “”
- apiGroups:
- apps
nonResourceURLs:
resourceNames:
resources: - daemonsets
verbs: - list
- watch
- get
- apps
- apiGroups:
- apps
nonResourceURLs:
resourceNames:
resources: - deployments
verbs: - list
- watch
- get
- apps
- apiGroups:
-
networking.k8s.io
nonResourceURLs:
resourceNames:
resources: - ingresses
verbs: - list
- watch
- get
-
networking.k8s.io