Components
Adding kubernetes component
This section describes how to add either a kubernetes or openshfit component to a devfile. You can apply configurations to your devfile with kubernetes or openshift components.
Prerequisites
Procedure
Define a component using the type
kubernetesoropenshift.Provide the content through the
uriorinlinedproperty.Adding openshift component using the uri property
devfile.yamlcomponents: - name: mysql openshift: uri: petclinic.yamlAdding a kubernetes component using the inlined property
devfile.yamlcomponents: - name: myk8deploy kubernetes: inlined: | apiVersion: batch/v1 kind: Job metadata: name: pi spec: template: spec: containers: - name: job image: myimage command: ["some", "command"] restartPolicy: NeverSpecify the endpoint through the endpoint property with
kubernetesoropenshiftcomponents.Associate
kubernetesoropenshiftcomponents withApplycommands. If you do not associateApplycommands, they are assumed to be applied at start up.