Reputation: 1185
I've couple of containers inside an openshift POD. Each container is running two different applications say ContainerOne (ApplicationOne), ContainerTwo(ApplicationTwo) how can I access each of these containers?
Upvotes: 7
Views: 24543
Reputation: 544
First find the pod: oc get pods
Second task is to list all containers oc describe pod/NAME_OF_YOUR_POD
Third is to connect to the container by oc rsh --container CONTAINERNAME PODNAME
Upvotes: 12
Reputation: 2607
It depends what you mean by "access". I usually employ oc exec -it $pod -c $container bash
in such situations (w/o -c $container
for pods with only single containers). $pod
and $container
can e.g. be learned from oc describe pods
.
Upvotes: 3