We have two container in one pod. One container is a nginx-forwarder and the other one is the normal application container. I want to access to the app-container via oc.exe
to get the jboss server.log
.
I executed the following command:
oc exec <pod-name> cat <path-2-serverlog>/server.log <local path>/server.log
But the default container is the nginx forwarder and therefore the directories included in are not existing.
Error Message:
Defaulting container name to nginx-jwt-forwarder. Use 'oc describe pod/<pod-name> -n <oc-project>' to see all of the containers in this pod. cat: <path-2-serverlog/server.log: No such file or directory cat: c:/temp/server.log: No such file or directory command terminated with exit code 1
How can I switch to the app-container instead of the default nginx?