← 返回命令列表

Linux command

kubectl-api-resources 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List all API resources

kubectl api-resources

List namespaced resources only

kubectl api-resources --namespaced=true

List resources with specific API group

kubectl api-resources --api-group=[apps]

Show resource short names

kubectl api-resources -o wide

List verbs for resources

kubectl api-resources --verbs=[list,get]

说明

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.

参数

--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).

FAQ

What is the kubectl-api-resources command used for?

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.

How do I run a basic kubectl-api-resources example?

Run `kubectl api-resources` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --namespaced _bool_ do in kubectl-api-resources?

Filter namespaced/cluster-scoped resources.