1

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
  • 1,423
  • 3
  • 16
  • 32

2 Answers2

1

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
  • 305
  • 2
  • 15
0

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
  • 41,002
  • 9
  • 78
  • 107