在fluentd中更改conf文件 [英] Changing conf file in fluentd

查看:130
本文介绍了在fluentd中更改conf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在kubernetes上流畅地配置了配置,并带有几个正在运行的Pod. 我想更改td_agent.conf文件,并添加另一个标签,但是,我无法在每个吊舱内更改conf文件.我该如何处理?我是否需要更改正在运行的Pod的yaml文件并重新运行它们?

I have fluentd configured on kubernetes, with a couple of running pods. I want to change the td_agent.conf file, and add another tag, however, I can't change the conf file inside every pod. How can I manage this? Do I have to change the yaml file of the running pods and re-run them?

推荐答案

我是否需要更改正在运行的Pod的yaml文件并重新运行它们?

Do I have to change the yaml file of the running pods and re-run them?

正确.问题在于,当您仅更改配置映射值时,它不会触发您的Pod重新启动,而是会更新ConfigMap并即时进行安装,而Fluentd无法处理该操作.

Correct. The problem is that when you change only the config map value it will not trigger your pods to restart, instead, it will update ConfigMap and mounts on-the-fly which is not handled by fluentd.

我认为您正在使用头盔来部署流利的武器.在这种情况下,您需要将哈希注释添加到Deployment/DaemonSet中,例如:此相关问题以获取更多选项.

I assume you are using helm to deploy fluentd. In this case, you need to add a hash annotation to your Deployment/DaemonSet, example: https://github.com/helm/charts/blob/4a4d83f2c68bb07691e9f9df8b5e5a4327c9f6bf/stable/grafana/templates/statefulset.yaml#L27. You do this for every ConfigMap mount you have, and since a change in annotation triggers a rolling update - you receive the update in fluentd. Also, see this related question for more options.

这篇关于在fluentd中更改conf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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