Closed rade closed 6 years ago
Right now a user can only view the logs of containers, not of whole pods. We have a hack in place so that when a pod only has one non-pause container then in the details panel of the pod, we let the user view the logs of that container.
I completely misinterpreted what I was seeing...
The 'Get logs' button on the pod detail panel does fetch the pod logs using the k8s API. It even shows history.
HOWEVER, it appears that said k8s API requires a container to be specified when the pod contains more than one (plus plause). Otherwise a "a container name must be specified for pod blah, choose one of: [blah, blah]" error is returned.
What are you suggesting design-wise? Interleaving the logs in the output window? Should we add a prefix saying where they're from? eg.
[container_a] foo
[container_a] bar
[container_b] foo
[container_a] baz
[container_b] bar
see also #1493.
@awh has just found https://github.com/wercker/stern - perhaps we could embed that?
It can also provide combined logs across replicas, so we could get logs at the controller level!
This got resolved by #3013
Right now a user can only view the logs of containers, not of whole pods. We have a hack in place so that when a pod only has one non-pause container then in the details panel of the pod, we let the user view the logs of that container. This doesn't work for the likes of Weave Net pods, which comprise several containers.
Essentially we want the equivalent of
kubectl logs -f <pod>
.