Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List of Kubernetes RBAC rule verbs

Tags:

I want to give my application limited access to get the replicas of different statefulsets (and maybe deployment) and if necessary scale them up or down.

I have created ServiceAccount, Rolebinding and Role for this but I can't find the complete list of rule verbs ("get", "watch", "list", "update") and what are their limitations, for example can I use update for scaling or I need another verb? And where can I find a list or table that described these verbs?

My yaml file:

kind: Role apiVersion: rbac.authorization.k8s.io/v1beta1 metadata:   name: scaler-role   namespace: {{ .Release.Namespace  | quote }} rules: - apiGroups: ["apps"]   resources: ["statefulset"]   verbs: ["get", "watch", "list", "update"] 
like image 364
AVarf Avatar asked Aug 26 '19 16:08

AVarf


People also ask

How does RBAC works in Kubernetes?

RBAC in Kubernetes is the mechanism that enables you to configure fine-grained and specific sets of permissions that define how a given user, or group of users, can interact with any Kubernetes object in cluster, or in a specific Namespace of cluster.

Which of these authorization modes is supported by Kubernetes?

Kubernetes supports multiple authorization modules, such as ABAC mode, RBAC Mode, and Webhook mode.

What are roles in Kubernetes?

In Kubernetes, ClusterRoles and Roles define the actions a user can perform within a cluster or namespace, respectively. You can assign these roles to Kubernetes subjects (users, groups, or service accounts) with role bindings and cluster role bindings.


1 Answers

Here is the list of RBAC verbs:

RBAC verbs

For scaling, I think you'll need write permissions (create, update and patch) along with read permissions (get, list and watch).

like image 195
Vikram Hosakote Avatar answered Sep 19 '22 06:09

Vikram Hosakote