clusterrolebinding.yaml 641 B

12345678910111213141516171819202122232425262728293031
  1. # Source: Pods.metrics.k8s.io is forbidden: User "system:kube-proxy"
  2. # https://forums.rancher.com/t/pods-metrics-k8s-io-is-forbidden-user-system-kube-proxy/12058/3
  3. ---
  4. apiVersion: rbac.authorization.k8s.io/v1
  5. kind: ClusterRole
  6. metadata:
  7. name: view-metrics
  8. rules:
  9. - apiGroups:
  10. - metrics.k8s.io
  11. resources:
  12. - pods
  13. - nodes
  14. verbs:
  15. - get
  16. - list
  17. - watch
  18. ---
  19. apiVersion: rbac.authorization.k8s.io/v1
  20. kind: ClusterRoleBinding
  21. metadata:
  22. name: view-metrics
  23. roleRef:
  24. apiGroup: rbac.authorization.k8s.io
  25. kind: ClusterRole
  26. name: view-metrics
  27. subjects:
  28. - apiGroup: rbac.authorization.k8s.io
  29. kind: User
  30. name: system:kube-proxy