metrics server request failed - “403 Forbidden“

部署metrics server时,一直报403,搞了很久,根据网上大多数解决办法,加–kubelet-insecure-tls,依旧没能解决问题,在clusterrole里添加 nodes/stats,问题解决,附上yaml

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: system:metrics-server
rules:
  - apiGroups:
      - ""
    resources:
      - nodes/stats
      - nodes
    verbs:
      - get
      - list

你可能感兴趣的:(监控日志,k8s,kubernetes,devops)