I have a multi-container pod in my kubernetes deployment:
- java
- redis
- nginx
For every of those containers, there's a container with Prometheus exporter as well.
The question is how can I expose those ports to Prometheus if annotations section supports only one port per pod?
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: 'xxxx'
but I need something like this:
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port_1: 'xxxx'
prometheus.io/port_2: 'yyyy'
prometheus.io/port_3: 'zzzz'
Maybe there's some other method to scrape all metrics from my multi-container pods? Thanks in advance for any kind of help.