Kubernetes最新版本引发RBAC错误

时间:2018-11-06 10:31:10

标签: kubernetes

在最近的kubernetes版本升级之前,我的Scaler服务运行良好。现在,我不断收到以下错误。 (已删除一些信息)

Error from server (Forbidden): deployments.extensions "redacted" is forbidden: User "system:serviceaccount:namesspace:saname" cannot get resource "deployments/scale" in API group "extensions" in the namespace "namespace"

我具有以下群集角色:

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    app: redacted
    chart: redacted
    heritage: Tiller
    release: redacted
  name: redacted
rules:
- apiGroups:
  - '*'
  resources: ["configmaps", "endpoints", "services", "pods", "secrets", "namespaces", "serviceaccounts", "ingresses", "daemonsets", "statefulsets", "persistentvolumeclaims", "replicationcontrollers", "deployments", "replicasets"]
  verbs: ["get", "list", "watch", "edit", "delete", "update", "scale", "patch", "create"]
- apiGroups:
  - '*'
  resources: ["nodes"]
  verbs: ["list", "get", "watch"]

1 个答案:

答案 0 :(得分:3)

scale是子资源,而不是动词。在资源列表中包括“部署/规模”。

相关问题