Is there a way to connect to a running pod on OpenShift v3 using an external tool like PuTTY or WinSCP? I'm aware of the oc rsh
and oc rsync
commands to get remote shell and file access, but it would be more convenient for me to use a GUI tool like WinSCP if, for example, I want to browse several logs and other files on my pod.
I recall that with OSEv2 there was a way to set up private keys and use those types of tools, and I tried to find something similar in the docs for v3 to no avail. Is anyone aware of a way to accomplish this?
Thanks!
No, don't believe there is.
One concern is that you shouldn't be logging to files in the container anyway. When using a container runtime like Docker, best practice is to configure applications to send logging to stdout/stderr so that the runtime environment can intercept logs for you. In the case of OpenShift you could then access logs using oc logs
or OpenShift may also be set up to send logs into a ELK stack so can interrogate them that way.
One of the reasons you don't log into the container is that the logs will be lost when the container is shutdown. So if your container crashes you will not have any way to find out what went wrong.
Another problem with logging into the container is that it is likely the logs will not be getting rotated as normal system mechanisms for doing log file rotation would not be running. As a result the logs will grow indefinitely and could eventually use up all the space provide for files to the container.
What is the application and what are the logs for?