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?
How to access container within an openshift pod
Asked Answered
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
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
.
© 2022 - 2024 — McMap. All rights reserved.
oc rsh
command, including its--container
option, or the feature of the web console to access running pods/containers? – Footbridge