Overview of kubernetes apigroup subresources

2/7/2020

How can I get a list of subresources that can be used in an RBAC role?

For example, I know that pods/exec is a valid resource (discovered by searching SO actually), but I cannot figure out where this is officially mentioned.

kubectl api-resources gives me pods as a valid resource, but not pods/exec.

I'm looking at the Kubernetes API website (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.14/), but if that information is there, I'm unable to find it.

How are mere mortals like me supposed to find this information?

-- Jeroen Jacobs
kubernetes

2 Answers

2/7/2020

These apis are not documented officially. exec is an api with is actually exposed by kubelet. You can check kubelet code to see what apis are exposed by kubelet.

-- Arghya Sadhu
Source: StackOverflow

2/7/2020

I do agree that it does not give you much details. I had the same issue.

I came across this a couple of weeks ago.

https://stackoverflow.com/a/51289417/2752291
-- Raja
Source: StackOverflow