April 2018
Intermediate to advanced
468 pages
14h 34m
English
Once the CustomResourceDefinition object has been created, you can create custom resources of that resource kind in particular, Candy in this case (candy becomes CamelCase Candy). Candy objects can contain arbitrary fields with arbitrary JSON. In the following example, a flavor custom field is set on the Candy object. The apiVersion field is derived from the CRD spec's group and version fields:
apiVersion: "awesome.corp.com/v1" kind: Candy metadata: name: chocolatem spec: flavor: "sweeeeeeet"
You can add arbitrary fields to your custom resources. The values can be any JSON values. Note that these fields are not defined in the CRD. Different objects can have different fields. Let's create it:
> kubectl create ...
Read now
Unlock full access