以下所有规则中首先决定资源是否属于all。 类别或非类别。
这里的规则是,在输出。
没有集群范围的资源
No namespace admin level resources (limits, quota, policy,
authorization rules)
没有可能无法收回的资源(秘密和临时)
Resources that are considered "similar" to #3 should be grouped the
same (configmaps)
回答<> 取自rcorre s Response。
kubectl api-resources --verbs=list --namespaced -o name
| xargs -n 1 kubectl get --show-kind --ignore-not-found -l <label>=<value> -n <namespace>
Lastly, If you want to add a Custom Resource in all category, you need to provide these field in your CRD spec. custom-resource-definitions:categories
# categories is a list of grouped resources the custom resource belongs to.
categories:
- all