OPENSHIFT-280-8-使用第三方模板创建应用

本文档介绍了如何在 OpenShift 中利用第三方模板创建 MySQL 应用。首先,通过网页界面或命令行获取 MySQL 模板。接着,使用 `oc export` 命令将模板导出为 YAML 文件并编辑。然后,应用修改后的模板,并检查项目中的 pod 和服务资源信息。
摘要由CSDN通过智能技术生成

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值