...
1apiVersion: apiextensions.k8s.io/v1
2kind: CustomResourceDefinition
3metadata:
4 # name must match the spec fields below, and be in the form: <plural>.<group>
5 # XXX: what is group name supposed to mean???
6 name: customs.example.org
7spec:
8 # group name to use for REST API: /apis/<group>/<version>
9 group: example.org
10 # list of versions supported by this CustomResourceDefinition
11 versions:
12 - name: v1beta1
13 # Each version can be enabled/disabled by Served flag.
14 served: true
15 # One and only one version must be marked as the storage version.
16 storage: true
17 schema:
18 openAPIV3Schema:
19 type: object
20 properties:
21 apiVersion: { type: string }
22 kind: { type: string }
23 metadata: { type: object }
24 spec:
25 type: object
26 x-kubernetes-preserve-unknown-fields: true
27 # either Namespaced or Cluster
28 scope: Namespaced
29 names:
30 # plural name to be used in the URL: /apis/<group>/<version>/<plural>
31 plural: customs
32 # singular name to be used as an alias on the CLI and for display
33 singular: custom
34 # kind is normally the CamelCased singular type. Your resource manifests use this.
35 kind: Custom
36 # shortNames allow shorter string to match your resource on the CLI
37 shortNames:
38 - cus
39---
40apiVersion: apiextensions.k8s.io/v1
41kind: CustomResourceDefinition
42metadata:
43 # name must match the spec fields below, and be in the form: <plural>.<group>
44 name: services.example.org
45spec:
46 # group name to use for REST API: /apis/<group>/<version>
47 group: example.org
48 # list of versions supported by this CustomResourceDefinition
49 versions:
50 - name: v1beta1
51 # Each version can be enabled/disabled by Served flag.
52 served: true
53 # One and only one version must be marked as the storage version.
54 storage: true
55 schema:
56 openAPIV3Schema:
57 type: object
58 properties:
59 apiVersion: { type: string }
60 kind: { type: string }
61 metadata: { type: object }
62 spec:
63 type: object
64 x-kubernetes-preserve-unknown-fields: true
65 # either Namespaced or Cluster
66 scope: Namespaced
67 names:
68 # plural name to be used in the URL: /apis/<group>/<version>/<plural>
69 plural: services
70 # singular name to be used as an alias on the CLI and for display
71 singular: service
72 # kind is normally the CamelCased singular type. Your resource manifests use this.
73 kind: Service
74 # shortNames allow shorter string to match your resource on the CLI
75 shortNames:
76 - csrv
View as plain text