Back to Home or Configuration Mgt

Overview

A template describes a set of objects that can be parameterized and processed to produce a list of objects for creation by OpenShift

Back to Home or Openshift

Different types of files

  • kind: Deployment
  • kind: Pod
  • kind: Template

Configuration with Templates

Templates can be json or yaml, and are used for all areas of Openshift configuration and can be created or modified using the web gui or command line.

Using the Command Line

Create a template in your current project

oc create -f <filename>

or to a specific named project

oc create -f <filename> -n <project>

You can the use the created template using the process* command passing parameters

 oc process --parameters -f <filename>

e.g

$ oc process -f my-rails-postgresql \
    -v POSTGRESQL_USER=bob,POSTGRESQL_DATABASE=mydatabase

Using the Web Gui

On the project web gui you can

  • select and modify the parameters on an existing template
  • provide a

Writing templates : https://docs.openshift.com/container-platform/3.3/dev_guide/templates.html#dev-guide-templates

 
openshift_template.txt · Last modified: 2020/01/07 04:11 by root
 
RSS - 200 © CrosswireDigitialMedia Ltd