What are the Kubernetes API resources (within ResourceAttributes) and verbs?

611 Views Asked by At

I'm wanting to understand what authorisation requests are possible when implementing a custom webhook. The docs describe a SubjectAccessReview that references a SubjectAccessReviewSpec that references a ResourceAttributes object that references a string field called resource, which is described as:

Resource is one of the existing resource types. "*" means all.

Where is the list of all resources and what resources are defined?

What are the verbs that can appear in the request?

1

There are 1 best solutions below

0
On BEST ANSWER

Kubernetes resources are grouped together because they are logically related.For examples, apps/v1beta1/deployment(group/version/resource or GVR).Therefore, the Pods needs to run all the time.That's why they are called workload. another example would be batch/v1/cronJob therefore, Pod needs to run for short time.

By using the following command you can list out the current Groups/Versions in the cluster.

kubectl api-versions 

Now If you want to know about what kind of operation you can do on the resources you can use the following command. It will list out the operation with explanation.

kubectl --help

I have attached links for further understanding the kube-api server

deep-dive-api-server-part-1

deep-dive-api-server-part-2

deep-dive-api-server-part-3

typical-flow-in-k8s

what-happens-when-k8s