1.登陆网页界面,找到相应模板。(也可以通过命令行)
2.oc export template mysql-ephemeral -n openshift > mysql-tmp.yaml将模板信息输出为模板资源文件。
[student@workstation wordpress]$ oc export template mysql-ephemeral -n openshift > mysql-tmp.yaml
[student@workstation wordpress]$ cat mysql-tmp.yaml
apiVersion: v1
kind: Template
labels:
template: mysql-ephemeral-template
message: |-
The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.
Username: ${MYSQL_USER}
Password: ${MYSQL_PASSWORD}
Database Name: ${MYSQL_DATABASE}
Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/
For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/5.7/README.md.
metadata:
annotations:
description: |-
MySQL database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/5.7/README.md.
WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing
iconClass: icon-mysql-database
openshift.io/display-name: MySQL (Ephemeral)
tags: database,mysql
template.openshift.io/documentation-url: https://do