简体   繁体   English

从kubernetes管理的docker容器中记录nginx事件

[英]logging nginx events from a docker container managed by kubernetes

Currently, to my understanding, kubernetes offers no logging solutions on it's own and it also does not allow one to specify the logging driver when using docker as the container technology due to scope encapsulation concerns. 目前,据我所知,kubernetes本身不提供任何日志记录解决方案,并且由于范围封装方面的考虑,当使用docker作为容器技术时,它还不允许人指定日志记录驱动程序。

This leaves folks with the ugly solution of tailing json logs from shared volumes using either fluentd, filebeat, or some other file tailing demon, parsing these, then sending them to the desired storage backend. 这给人们留下了使用流利的,filebeat或其他文件尾部妖魔从共享卷中尾随json日志的丑陋解决方案,将其解析,然后将它们发送到所需的存储后端。

My question is, is there any repo or public knowledge config store for this type of scenario for people that have gone through this before? 我的问题是,对于以前经历过这种情况的人们,是否有针对这种情况的任何回购或公共知识配置存储? My use case would involve tailing the logs of a nginx docker image and writing out the fluentd/grok pattern myself seems really painful, plus i wouldn't want to struggle on an issue already solved by someone else. 我的用例涉及尾随nginx docker图像的日志,写出我自己似乎很痛苦的流利/怪诞的模式,再加上我不想为别人已经解决的问题而苦苦挣扎。

Thanks 谢谢

We tried logdna and the integration with k8s is pretty solid. 我们尝试了logdna ,与k8s的集成非常可靠。 Most of the time I just tail the log of some container using kubectl logs -f [CONTAINER_ID]. 大多数时候,我只是使用kubectl logs -f [CONTAINER_ID]尾随某个容器的日志。 I'm guessing you're looking for a persistent approach. 我猜您正在寻找一种持久的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM