Custom exporter inside a pod

Hello everyone!
I just would like to know, is it a good idea to have custom exporter inside a pod?
For example, I have some application, that works in one container and pod. Now I want to collect some data from inside this container. So I decided to install exporter alongside with my app, inside the same container, but working on another port.
Are there any problems with that installation?
Thank you

In general the one container per pod is the best practice.

I would offer to export the metrics you are interested in from the main process but I guess you already thought of that, in general you want a single entry point for a container so that if the process exits the container stop and restarted by kubernetes the risk is having the container running after the your app process exists(for any reason) and then you will be left only with the metrics process running inside the container.

Thank you!

1 Like