Bootstrap FreeKB - OpenShift - Remote shell to a pod using the oc rsh command
OpenShift - Remote shell to a pod using the oc rsh command

Updated:   |  OpenShift articles

If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.

A node contains one or more pods, and each pod contains one or more containers.

 

Before issuing the oc rsh command, issue the oc login command and you may want to also use the oc get pods command to list the pods in a project. In this example, a remote shell is made to pod001 in project001.

oc rsh -n project001 pod001

 

If you successfully connect to the pod, something like this should be displayed. You can now run commands on the pod.

Defaulting container name to elasticsearch.
Use 'oc describe pod/pod001 -n project001' to see all of the containers in this pod.
sh-4.2$

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 943cdd in the box below so that we can be sure you are a human.