Easier method for getting container logs in sidecar charms
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Currently if you're troubleshooting problems with a sidecar charm very often you need to look at the workload container logs. It's great that pebble now includes the workload output there, but the method for retrieving this is currently quite cumbersome. Assuming I have a model name of `concourse-test` and an application name of `concourse-worker` and a workload container name of `concourse-worker` the command (in MicroK8s) is:
microk8s.kubectl logs -n concourse-test concourse-worker-0 -c concourse-worker
It would be much easier if there was a juju native way of doing this. Something like this maybe?:
juju container-logs concourse-worker/0
I guess the obvious issue with this is which container this gets the logs for. Possibly we could default to getting them all but allow filtering?
juju container-logs -c concourse-worker concourse-worker/0
tags: | added: sidecar-charm |
Seems like a nice addition to the set of abstractions that Juju is providing over K8S +1 from me.