[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Viewing application logs on pods/containers



Hi

Im trying to expose an UI that will allow developers to be able to see application specific logs in the containers. kubectl logs <pod> <container> or oc build-logs might be able to get the build logs but Im trying to provide a way for the user to look inside the container.

Gotty (https://github.com/yudai/gotty) or similar services was what I was trying to do, which expose the terminal as a web application. If we could package gotty along with the container images and expose them, then the end-users might be able to get a view into the container.

The problem I have is that if I have multiple replicas fronted by a service, then the order of getting to a particular pod running gotty becomes tricky as we dont know which pod is being serviced. If we have a replica of 1, that solves the problem because there is only one pod but Im trying to see what if we have multiple replicas set up.

Is there any way to expose a Pod directly instead of going through the service? I could potentially label each of the pods differently and have Services that target each of the pods but that means I have to define Services everytime I increase/decrease the Pod. Are there any better ways than this.

Im a few days into learning openshift, so my terminologies might be incorrect, but please let me know if its unclear.

Thanks
Raja


--
Raja
rajasaur at gmail.com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]