Why
Often I need to look at multiple pod logs at the same time. For example the nginx ingress controller deployment or daemonset usually has at least a handful of pods running to share the load and for additional redundancy. To troubleshoot problems, I need to see them all.
Options
The trusted kubectl (I am a kube cuttle guy) command has an option to view or tail multiple containers based on a selector like this.
$ kubectl logs -n nginx-ingress -l 'app.kubernetes.io/name=fluent
However, if the pods in question come and go frequently, I am recommending stern instead:
Comments
Post a Comment