Kubernetes Liveness Probe 日志记录 [英] Kubernetes Liveness Probe Logging

查看:34
本文介绍了Kubernetes Liveness Probe 日志记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用 Kubernetes 1.1.3 及其默认的 fluentd-elasticsearch 日志记录.

We're using Kubernetes 1.1.3 with its default fluentd-elasticsearch logging.

我们还在容器上使用 LivenessProbes 以确保它们按预期运行.

We also use LivenessProbes on our containers to make sure they operate as expected.

我们的问题是我们从 LivenessProbe 发送到 STDOUT 的行似乎没有到达 Elastic Search.

Our problem is that lines we send out to the STDOUT from the LivenessProbe does not appear to reach Elastic Search.

有没有办法像处理 Pod 中的常规容器一样使 LivenessProbes 输出流畅?

Is there a way to make fluentd ship LivenessProbes output like it does to regular containers in a pod?

推荐答案

probe 的输出被节点上的 Kubelet 组件吞噬,该组件负责运行这些探测器(源代码,如果您有兴趣).如果探测失败,其输出将被记录为与 pod 关联的事件,该事件应该可以通过 API 访问.

The output from the probe is swallowed by the Kubelet component on the node, which is responsible for running the probes (source code, if you're interested). If a probe fails, its output will be recorded as an event associated with the pod, which should be accessible through the API.

成功探测的输出没有记录在任何地方 除非您的 Kubelet 的日志级别至少为 --v=4,在这种情况下,它将在 Kubelet 的日志中.

The output of successful probes isn't recorded anywhere unless your Kubelet has a log level of at least --v=4, in which case it'll be in the Kubelet's logs.

如果您对输出结果有什么想法,请随时在 Github 问题中提交功能请求:)

Feel free to file a feature request in a Github issue if you have ideas of what you'd like to be done with the output :)

这篇关于Kubernetes Liveness Probe 日志记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆