Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 703 Bytes

nodes-containers-remote-commands-about.adoc

File metadata and controls

30 lines (22 loc) · 703 Bytes

Executing remote commands in containers

Support for remote container command execution is built into the CLI.

Procedure

To run a command in a container:

$ oc exec <pod> [-c <container>] <command> [<arg_1> ... <arg_n>]

For example:

$ oc exec mypod date
Thu Apr  9 02:21:53 UTC 2015
Important

For security purposes, the oc exec command does not work when accessing privileged containers except when the command is executed by a cluster-admin user.