Oc rsh: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=External= * https://docs.openshift.com/container-platform/latest/cli_reference/basic_cli_operations.html#rsh =Internal= * oc =Overview= <pre> </pre>")
 
 
(7 intermediate revisions by the same user not shown)
Line 9: Line 9:
=Overview=
=Overview=


<pre>
Open a remote shell session to a container running in a pod. If more than one containers run in the pod, the default will be used.
</pre>
 
oc rsh -n <''namespace''> <''pod-name''>
 
To connect to a specific container (and not the default):
 
oc rsh -n <''namespace''> -c <''container-name''> <''pod-name''>
 
Specific commands can be executed by listing them on the command line:
 
oc rsh <''pod-name''> <''command''>
 
Also see: [[oc exec]].

Latest revision as of 18:16, 21 November 2017

External

Internal

Overview

Open a remote shell session to a container running in a pod. If more than one containers run in the pod, the default will be used.

oc rsh -n <namespace> <pod-name>

To connect to a specific container (and not the default):

oc rsh -n <namespace> -c <container-name> <pod-name>

Specific commands can be executed by listing them on the command line:

oc rsh <pod-name> <command>

Also see: oc exec.