K8S自定义资源定义添加'explain'信息
Add 'explain' information for custom resource definition in K8S
我已经在 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
现在尝试为我的自定义资源获取 'explain':
kubectl explain resource
我收到以下错误:
group example.com has not been registered
如何将 explain
信息添加到我的自定义资源定义中,或者 CRD 不支持此信息?
使用服务器发布的 openapi 模式信息解释作品。在 v1.15 之前,CRD 无法发布该信息。
在 1.15+ 中,指定 structural schemas and enable pruning 的 CRD 发布 OpenAPI 并使用 explain。
我已经在 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
现在尝试为我的自定义资源获取 'explain':
kubectl explain resource
我收到以下错误:
group example.com has not been registered
如何将 explain
信息添加到我的自定义资源定义中,或者 CRD 不支持此信息?
使用服务器发布的 openapi 模式信息解释作品。在 v1.15 之前,CRD 无法发布该信息。
在 1.15+ 中,指定 structural schemas and enable pruning 的 CRD 发布 OpenAPI 并使用 explain。