opencredo / kubefuse

Kubernetes as a FUSE Filesystem
https://opencredo.com/blogs/introducing-kubefuse-file-system-kubernetes/
Apache License 2.0
264 stars 18 forks source link

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

Open SleepyBrett opened 8 years ago

SleepyBrett commented 8 years ago

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!

mboersma commented 8 years ago

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 commented 7 years ago

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

bspaans commented 7 years ago

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 commented 7 years ago

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