Changing conf file in fluentd [closed]

十年热恋 提交于 2021-01-07 02:52:47

问题


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?


回答1:


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

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.

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.



来源:https://stackoverflow.com/questions/64521658/changing-conf-file-in-fluentd

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!