kubefuse icon indicating copy to clipboard operation
kubefuse copied to clipboard

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

Open SleepyBrett opened this issue 8 years ago • 4 comments

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!

SleepyBrett avatar May 02 '16 16:05 SleepyBrett

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
...

mboersma avatar Jun 29 '16 18:06 mboersma

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

benmathews avatar Jul 27 '16 20:07 benmathews

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.

bspaans avatar Aug 08 '16 14:08 bspaans

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

paurullan avatar Oct 10 '16 09:10 paurullan