Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing logs from a k8s pod #142

Closed
TrevorWatson opened this issue May 11, 2018 · 5 comments
Closed

Accessing logs from a k8s pod #142

TrevorWatson opened this issue May 11, 2018 · 5 comments

Comments

@TrevorWatson
Copy link

I've trawled through the skuber source and can't find a way to access a pod's logs as described here:
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#-strong-misc-operations-strong--71

Am I missing something or does skuber not support this currently?

Thanks,
Trevor

@doriordan
Copy link
Owner

No, you aren't missing anything, it isn't supported yet. It is a bit of s special case on the Kubernetes API so would probably be supported in skuber via a new method on the client api.

@TrevorWatson
Copy link
Author

Cheers David, I suspected as much.
I've downloaded the skuber repo and am trying to get something working now

@doriordan
Copy link
Owner

I actually implemented something myself before I saw that you are working on it - see PR #146 (comments welcome)

@TrevorWatson
Copy link
Author

I had a hack at it and got it working for our environment, but yours looks to be a much simpler (and more complete) solution.
I did wonder if it should be something in the Pod class since it only applies to pods and containers within pods, but given the way things work at the moment, it seems reasonable where you have it in the api.
One other thing I did to was to extend buildRequest to take an optional path string as the last parameter. This seemed like a useful enhancement and saved having to hack the 'name' parameter to append it.
Regardless, we'd be happy just to have what you've got as it would be very useful for us to get the pod logs programatically.

@doriordan
Copy link
Owner

Closing as PR #146 now merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants