我在 K8S 中注册了自定义资源定义:
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: resources.example.com
labels:
service: "my-resource"
spec:
group: example.com
version: v1alpha1
scope: Namespaced
names:
plural: resources
singular: resource
kind: MYRESOURCE
shortNames:
- res
现在尝试为我的自定义资源获取“解释”:
kubectl explain resource
我收到以下错误:
group example.com has not been registered
如何将explain
信息添加到我的自定义资源定义中,或者 CRD 不支持此功能?