【问题标题】:What apiGroups and resources exist for RBAC rules in kubernetes?Kubernetes 中的 RBAC 规则存在哪些 apiGroups 和资源?
【发布时间】:2019-05-30 18:32:34
【问题描述】:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: xi-{{instanceId}}
  name: deployment-creation
rules:
- apiGroups: [""]
  resources: ["pods"]
  verbs: ["get", "list", "watch"]
- apiGroups: ["batch", "extensions"]
  resources: ["jobs"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

在上面的示例中,我允许对 pod 和作业进行各种操作。 对于 pod,apiGroup 为空白。对于作业,apiGroup 可能是批处理或扩展。 我在哪里可以找到所有可能的资源,以及每个资源应该使用哪个 apiGroup?

【问题讨论】:

    标签: kubernetes rbac


    【解决方案1】:

    kubectl api-resources 将列出所有支持的资源类型和 api-group。这是resource-types的表格

    【讨论】:

      猜你喜欢
      • 2019-11-11
      • 2020-06-27
      • 2019-12-30
      • 2021-08-16
      • 1970-01-01
      • 2019-11-24
      • 2017-02-16
      • 2019-04-07
      • 2018-08-29
      相关资源
      最近更新 更多