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

Doesn't seem to handle multi container pods in respect to logs #1

Open
SleepyBrett opened this issue May 2, 2016 · 4 comments
Open
Labels

Comments

@SleepyBrett
Copy link

A single container pod's logs seems to work fine, but it looks like you might need to add a deeper hierarchy for containers. (the equiv. of kubectl logs podname -c containername).

But so far very fun work!

@bspaans bspaans added the bug label May 19, 2016
@mboersma
Copy link
Contributor

I see the same problem. Need to pass kubectl the -c flag in some cases:

$ cat ~/k8s/kube-system/pod/kube-dns-v11-19scr/logs
$ 
$ kubectl --namespace=kube-system logs kube-dns-v11-19scr
Error from server: a container name must be specified for pod kube-dns-v11-19scr, choose one of: [etcd kube2sky skydns healthz]
$ kubectl --namespace=kube-system logs -c etcd kube-dns-v11-19scr
2016-06-29 00:29:03.644732 I | etcdserver: start to snapshot (applied: 4810481, lastsnap: 4800480)
2016-06-29 00:29:03.705105 I | etcdserver: saved snapshot at index 4810481
2016-06-29 00:29:03.705411 I | etcdserver: compacted raft log at 4805481
...

@benmathews
Copy link

Seems like the primary issue in resolving this is deciding on the proper directory hierarchy.

@bspaans
Copy link
Contributor

bspaans commented Aug 8, 2016

Yes indeed. I like the simplicity of having a single logs file, but maybe we could add extra folders or files when there is more than one container in the pod.

@paurullan
Copy link

Since the pods need to have a name it may be as simple as naming the logs «log_container».

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

No branches or pull requests

5 participants