Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What apiGroups and resources exist for RBAC rules in kubernetes?

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"]

In the above example, I permit various operations on pods and jobs. For pods, the apiGroup is blank. For jobs, the apiGroup may be batch or extensions. Where can I find all the possible resources, and which apiGroup I should use with each resource?

like image 984
whistling_marmot Avatar asked May 30 '19 10:05

whistling_marmot


1 Answers

kubectl api-resources will list all the supported resource types and api-group. Here is the table of resource-types

like image 75
Suresh Vishnoi Avatar answered Sep 29 '22 12:09

Suresh Vishnoi