LinuxCommandLibrary

kubectl-api-resources

lists all resource types available in the Kubernetes cluster

TLDR

List all API resources

$ kubectl api-resources
copy
List namespaced resources only
$ kubectl api-resources --namespaced=true
copy
List resources with specific API group
$ kubectl api-resources --api-group=[apps]
copy
Show resource short names
$ kubectl api-resources -o wide
copy
List verbs for resources
$ kubectl api-resources --verbs=[list,get]
copy

SYNOPSIS

kubectl api-resources [options]

DESCRIPTION

kubectl api-resources lists all resource types available in the Kubernetes cluster. Shows resource names, short names, API group, and whether they are namespaced. Useful for discovering available resource types.

PARAMETERS

--namespaced bool

Filter namespaced/cluster-scoped resources.
--api-group group
Filter by API group.
--verbs verbs
Filter by supported verbs.
-o format
Output format (wide, name).

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community