This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.30.2. 基本用法
CLI 中内置了对远程容器命令执行的支持:
oc exec <pod> [-c <container>] <command> [<arg_1> ... <arg_n>]
$ oc exec <pod> [-c <container>] <command> [<arg_1> ... <arg_n>]
例如:
oc exec mypod date
$ oc exec mypod date
Thu Apr 9 02:21:53 UTC 2015