Red Hat Training

A Red Hat training course is available for OpenShift Container Platform

2.2.2.4.4. 查看输出(不创建)

要查看要创建的 new-app 的空运行,您可以使用 -o|--output 参数及 yamljson 值。然后,您可以使用输出来预览要创建的对象,或者将其重定向到您可以编辑的文件。满意后,您可以使用 oc create 创建 OpenShift Container Platform 对象。

new-app 工件输出到文件中,编辑工件,再创建工件:

$ oc new-app https://github.com/openshift/ruby-hello-world \
    -o yaml > myapp.yaml
$ vi myapp.yaml
$ oc create -f myapp.yaml