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

Re: Viewing application logs on pods/containers



Raja,


I think for this level of integration you'll be better off starting from the origin code base, and try to integrate gotty with the OpenShift server, you might get some feedback by creating and issue or early pull request to discuss this feature.





On Thu, Aug 20, 2015 at 11:57 AM, Raja <rajasaur gmail com> wrote:
Hi
I was planning on accessing the pods through the service just like how the sample-app does.

The problem with accessing from the nodes is that it becomes insecure that I can access any of the pods logs from there. I could do a docker ps , get the ids and do any command there as well. If Im sandbox-ed inside that of a container, then I dont have a way to step out of that.

Ultimately, I was thinking of hooking this from within the Openshift origin UI where you could see the pods and have an option to view the logs from there as it becomes seamless for an end-user to see the pods along with a way to see inside them.

Regards
Raja


On Thu, Aug 20, 2015 at 2:46 PM, Rodolfo Carvalho <rcarvalh redhat com> wrote:
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



--
Raja
rajasaur at gmail.com



--
Rodolfo Carvalho

OpenShift Developer Experience

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