How to Get API Resource Details in Kubernetes

Find details about api-resources

Planted .

# To check if resource is namespaced or not
# Useful when deciding whether to create a role or clusterrole
kubectl api-resources --namespaced=false
kubectl api-resources --namespaced=true # this is also default

The api version which is the output of this command specifies whether resource is core resource (as "" in role definition for example) or not. V1 is core api-resource. Others need to be specified.

k api-resources | grep deploy
deployments                         deploy       apps/v1                           true         Deployment
Updated . Thoughts? Email me.