resource-reader.yaml 532 B

12345678910111213141516171819202122232425262728293031
  1. ---
  2. apiVersion: rbac.authorization.k8s.io/v1
  3. kind: ClusterRole
  4. metadata:
  5. name: system:metrics-server
  6. rules:
  7. - apiGroups:
  8. - ""
  9. resources:
  10. - pods
  11. - nodes
  12. - nodes/stats
  13. - namespaces
  14. - configmaps
  15. verbs:
  16. - get
  17. - list
  18. - watch
  19. ---
  20. apiVersion: rbac.authorization.k8s.io/v1
  21. kind: ClusterRoleBinding
  22. metadata:
  23. name: system:metrics-server
  24. roleRef:
  25. apiGroup: rbac.authorization.k8s.io
  26. kind: ClusterRole
  27. name: system:metrics-server
  28. subjects:
  29. - kind: ServiceAccount
  30. name: metrics-server
  31. namespace: kube-system