Once, you have the template, we need CLI tool such as "oc" or "kubectl" to process the template which will create the OCP object on OCP K8s server cluster.
a. Login to your OCP/K8s cluster server.
b. Run below commands to process the OCP object template if template do not have any parameters
# to list the def of OCP object in tempalte $ oc process -f <template_file> # to create the object mentioned in above template file in ocp $ oc process -f <template_file> | oc create -f # this will send the def to OCP server to create object
c. Run below commands if template have parameters
# to list the template parameters oc process --parameters -f <template_file> # to generate the object definition oc process -f <template_file> -p <param_name1>=<value1> -p <param_name2>=<value2> # to create the object in ocp oc process -f <template_file> -p <param_name1>=<value1> -p <param_name2>=<value2> | oc create -f
This is how we can process the template to generate the definition of OCP object and send the definition to OCP cluster to create the objects.
Facebook Page Facebook Group Twitter Feed Telegram Group
No comments:
Post a Comment