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

Re: Viewing application logs on pods/containers



Hi Raja,

How exactly are you planning to access the pods, network-wise? Do you want to fetch logs from other pods from within a pod?

In case you are running `gotty` from a host that can execute `oc` calls against your OpenShift cluster, you can use `oc logs`:

$ oc logs PODNAME...


This is independent of having services setup.




On Thu, Aug 20, 2015 at 10:37 AM, Raja <rajasaur gmail com> wrote:
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

_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users




--
Rodolfo Carvalho

OpenShift Developer Experience

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