13.4. 在 OpenShift 环境中启动容器和 pod

您可以使用 oc create 命令在 OpenShift 环境中创建 pod 和容器。

流程

  • 从 OpenShift 环境中的 YAML 文件创建 pod:

    $ oc create -f mypod.yaml
注意

在 Kubernetes 环境中,您可以使用带有同样标志的 kubectl create 命令。