Creating a Custom Resources Definition (CRD) object includes two steps: CRD registration and object creation.
Let's create a CRD configuration first:
# cat chapter5/5-4_crd/5-4-1_crd.yamlapiVersion: apiextensions.k8s.io/v1beta1kind: CustomResourceDefinitionmetadata: name: books.devops.kubernetes.comspec: group: devops.kubernetes.com version: v1alpha1 scope: Namespaced names: plural: books singular: book kind: Book shortNames: - bk validation: openAPIV3Schema: required: ["spec"] properties: spec: required: ["name", "edition"] properties: name: type: string minimum: 50 edition: type: string minimum: 10 chapter: type: integer minimum: 1 maximum: 2
With CustomResourceDefinition, we can define our own spec for the ...