如何从Kubernetes复制控制器的所有Pod中获取日志? [英] How do I get logs from all pods of a Kubernetes replication controller?
本文介绍了如何从Kubernetes复制控制器的所有Pod中获取日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
运行kubectl logs
向我展示了一个Kubernetes容器的stderr/stdout.
Running kubectl logs
shows me the stderr/stdout of one Kubernetes container.
如何获取一组Pod的聚合stderr/stdout,最好是由某个复制控制器创建的Pod?
How can I get the aggregated stderr/stdout of a set of pods, preferably those created by a certain replication controller?
推荐答案
您可以使用标签
kubectl logs -l app=elasticsearch
这篇关于如何从Kubernetes复制控制器的所有Pod中获取日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文